View Full Version : Simple plugin question
Ron
October 13th, 2002, 01:55 PM
The eventstring can be anything text-representable you like. Up to 200 chars or something ( not exactly sure of this limit, check the headers )
Ron
October 13th, 2002, 01:55 PM
Yeah you can only see a limited number of characters in the led display.
mflaster
October 13th, 2002, 01:55 PM
I'm thinking about making a minor modification to the keyboard plugin for myself, so that the 'event string' that is displayed in the Girder UI is more humanly readable.
I've read the keyboard plugin from the web site, it's pretty easy to understand.
Correct me if I'm wrong, but I can change the string that gets sent to Girder in the PostMessage to anything I want, right? As long as all different keys generate unique strings. And whatever string I post, that's the string that gets displayed in the GUI, right?
I'd just like to show ctl-alt-a instead of 1E0AC0000, for example. Up to 16 characters can be displayed, right?
Thanks!
Mike
mflaster
October 13th, 2002, 01:55 PM
Except the Girder GUI only displays 16 characters, right?
Thanks for the replies!
Mike
mflaster
October 13th, 2002, 01:55 PM
Oh, one other question. Is the keyboard plugin code posted on the site the most recent? keyboard.cpp is 8988 bytes and is from Jun 29, 2001.
In particular, my Girder file recorded a keyboard input of 1E000XZ for a multi-media 'video' key from my airboard, but the keyboard.cpp plugin that I'm looking at doesn't seem to allow an 'X' in Buffer[5] - it should be L or R or 0 only.
It seems the code I'm looking at doesn't match the keyboard.dll I'm using at home.
Mark F
October 13th, 2002, 01:55 PM
249 characters, max
Mark F
October 13th, 2002, 01:55 PM
Hi Jon.
I sent the source to Ron a couple of eons ago. :smile:
If you want, I could send you a copy direct.
Standard warning: It is not the prettiest code in the world.
Mark F
October 13th, 2002, 01:55 PM
The code is on it's way.
To change the translation behavior, look at:
void CDevice::SendData(CString str)
around
if (m_OutputMessage.m_MessageTranslate)
and
void CDevice::CompleteInput()
around
if (m_InputMessage.m_MessageTranslate)
To change the sending behavior, look at:
void CDevice::SendData(CString str)
where it does this:
else
{ // do as one lump
// Start the IO
WriteFile(m_hPort, buff, CurBuffIndx, &dwWrite, &oStruct);
// wait for it to finish
GetOverlappedResult(m_hPort,&oStruct,&dwWrite,TRUE);
}
Good luck and enjoy! :wink:
EDIT: They both sound useful and would be a welcome addition. Not crashing ranks way up there too. :smile:
_________________
Mark F
<font size=-1>[ This Message was edited by: Mark F on 2002-01-24 13:05 ]</font>
jon_rhees
October 13th, 2002, 01:55 PM
MarkF,
(sorry to go OT)
Good to see you posting! Hey I know you're busy, but you mentioned at one time you were going to submit the source for your serial plugin. Is that still the case? I'd like to make a few 'customizations' for myself...
-Jon
jon_rhees
October 13th, 2002, 01:55 PM
MarkF,
That would be great! You can send your non-pretty code (I bet mine is uglier) to jrhees@proxim.com when you get a chance.
FYI, the customizations I'd like to do are (in case you think some of these are useful for general purpose):
1. Allow HEX codes to be embedded in otherwise ASCII strings. As you know, if you pick HEX->Ascii in the plugin now, it considers everything as hex, including the contents on treg's, etc. I have a display I'm trying to drive which needs a few codes. I thought that supporting something like the ASCII escape e.g.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.