odd things when I copy to FIGnition, any ideas anyone?

57 views
Skip to first unread message

carl

unread,
Mar 15, 2013, 5:35:01 AM3/15/13
to fign...@googlegroups.com
Morning all,

I have been using the Figgipad encoder to copy data to the FIG with PuTTY, this involves me using notepad to 'write' my code and then I copy and paste this to my Putty window this then types verbatim to the fignition.

Sometimes though I have noticed when I am in the process of transferring data, the fignition jumps out of editor, I can replicate it at the same point of code every time, its where the txt format starts a new line, but not for all new lines.

When I use MSword this does not happen at all, something is omitted.

Now If there is an invisible command that jumps the fig out of editor, I could use this to jump out in my txt then type the commands to save then open a new block.I would need to discover the invisible command to ctrl+c So rather than manually doing saves I could run it all on one copy block, this would be as close to tape loading as I could muster, but I could then format all the progs by putting the commands in the right part of the existing listings to allow anyone with a figgipad encoder to 'load' progs in one go.

For example,

block one to be pasted to PuTTY
1 edit ( block one opens up)
*code
*code
*code
*code

[ the 'invisible ctrl+c'  inserted into notepad text ] ( Cmd? displays)
[ w ] ( w writes the block to eeprom )
2 edit ( block 2 opens up )
*
*
*
[ that command again, whatever it is ]
[ w ] 

end 

now my figintion would have 2 blocks written with one click on the mouse.

So anyone know what is making my fig jump out of editor when I use notepad?

Carl.

============================================================================
make a keyboard interface https://sites.google.com/site/figgipad/ and get help www.figgipad.com




Julian Skidmore

unread,
Mar 15, 2013, 10:26:20 AM3/15/13
to fign...@googlegroups.com
Hi Carl,

Actually yes, there are many situations that can cause the editor to
quit. Character codes in the range 32 .. 128 (normal printable
characters) get displayed as normal. The rest (in the range 0..31 and
>128) get interpreted differently.

#litc kKeyDel of edDel endof
8 of -1 edLR endof
9 of 1 edLR endof
10 of 1 edUD endof
11 of -1 edUD endof
13 of 13 edDoDispKey endof
#litc kKeyMark of edMark endof
#litc kKeyCopy of edCopy endof
#litc kKeyCmd of drop #litc kKeyExe 1 endof
#litc kKeyComplete of 1 endof
drop 0 ( no refresh)


In version 0.98 includes the following:

kKeyLeft = code 8.
kKeyRight= code 9.
kKeyDown = code 10.
kKeyUp = code 11.
kKeyEnter = code 13.
kKeyRep = code 0xD2 (inverse R).
kKeyCopy = code 0xC3 (inverse C).
kKeyMark = code 0xCD (inverse M)
kKeyDel = code 7.
kKeyCmd = code 0xAB (inverse +)
kKeyCtrl = code 0xDE (inverse ^)
kKeyEsc = code 27.
kKeyExe = code 0x8D (inverse '\r')
kKeyPrev = code 0xE (shift, left)
kKeyNext = code 0xF (shift, right)
kKeyPgDn = code 0x10 (shift, down)
kKeyPgUp = code 0x21 (shift, up)
kKeyComplete = code 0xA0 (inverse space, which you get by shift, space).

Many of these you're already aware of. The design of the editor (and
the command line editor) is such that it can be extended by wrapping
the code with other definitions.

The core editor, ed, can handle cursor control as well as mark and
copy. It always quits when the user presses a key it can't properly
process. ed is an invisible word, though you can see its definition in
github and will have a kern vector in 0.9.8.

edit calls ed and if the keypress on exit was kKeyCmd it processes a command.

boxed and query don't handle commands at all, but boxed returns the
exit code so you can write new definitions which do handle them. The
intention is that the new keypresses, things like kKeyEsc, kKeyPrev,
kKeyNext can handle things like form processing at an application
level; kKeyEsc being used for Cancel, with kKeyPrev and kKeyNext to
move between fields.

In addition, ed in version 0.9.8 is modified to support a
user-definable key handler. In edit it's used to support command
completion, so typing the beginning of a word will trigger the list of
words that begin with what you've typed to appear in the bottom four
lines and pressing kKeyComplete (shift, space) will complete the
command. Boxed and query don't support that feature. Command
completion is accomplished using a new version of vlist which lists
words that start with the text that follows it. For example:

vlist <exe> will list all the commands as normal.
vlist a<exe> will list all the commands beginning with 'a'.
vlist d.<exe> will list all the commands beginning with 'd.' (which I
think is d. and d.r).

etc.

So, onto the question in hand. Any other kind of keypress in the range
0..31 that's not handled by ed will quit the editor. So, <CR><LF>
won't quit the editor, <CR> is interpreted correctly and <LF> will
move onto the next line (or end of text), which if you're at the end
of the text already will have no effect. But <FF> form feed, code 12,
would cause the editor to exit; as will kKeyEsc, kKeyPrev, kKeyNext,
kKeyPgUp, kKeyPgDn. However, from query this should merely cause
FIGnition to begin interpreting the text you typed.

-cheers from julz
> --
> You received this message because you are subscribed to the Google Groups "FIGnition" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fignition+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Stuart Taylor

unread,
Mar 15, 2013, 12:13:08 PM3/15/13
to fign...@googlegroups.com
i would suggest not using notepad or wordpad, or you will run into these issues again and again.

If you can afford it, invest in a copy of UltraEdit if not, try notepad++ both of which are excellent text editors for windows that can handle the non printable characters in such a way as to make you aware of them.

Both editors are also recommended on this Jupiter ACE page http://www.jupiter-ace.co.uk/faq_Ace32_DosBox.html

stuart.

Stuart Taylor

unread,
Mar 15, 2013, 12:16:19 PM3/15/13
to fign...@googlegroups.com
and if you already have ultraedit, this page shows you how you can use syntax highlighting for Forth http://www.jupiter-ace.co.uk/faq_TextSyntaxHighlighting.html

stuart

carl

unread,
Mar 15, 2013, 12:24:57 PM3/15/13
to fign...@googlegroups.com
Thank you Stu and Julz

Will those utilities simulate 'alt' on putty I can now ctrl+c by holding alt + 3 in Putty but typing ♥ just gives me a full stop.

Carl

Stuart Taylor

unread,
Mar 15, 2013, 12:27:20 PM3/15/13
to fign...@googlegroups.com
what are you trying to achieve with Ctrl+c in putty?

stuart.

Stuart Taylor

unread,
Mar 15, 2013, 12:29:37 PM3/15/13
to fign...@googlegroups.com
ah wait, i just re-read you first post.

you just want to copy paste, and send the keys Ctrl+c to the figgy (via putty), yes?

carl

unread,
Mar 15, 2013, 12:54:55 PM3/15/13
to fign...@googlegroups.com
Yes exactly, so I can send one continuous string of text to the figntion, sort of working it by remote control. But alt key presses seem to be real time only, I recall using POS terminals with a record and play facility for keypresses, that would be ideal here.

Stuart Taylor

unread,
Mar 15, 2013, 1:39:58 PM3/15/13
to fign...@googlegroups.com
Yeah, the challenge you have (as i see it) is that Putty (or any terminal emulator) is going to interpret the key press Ctrl+c as a control code, typically for Ctrl+c  ETX.

If you didn't use putty you could send \x03 (which is the same as Ctrl+c), do you have to use putty?

Stuart.


carl

unread,
Mar 15, 2013, 1:59:38 PM3/15/13
to fign...@googlegroups.com
I used the terminal editor in the Arduino suite before, however this would not even paste, PuTTY is the best for pasting, I am now just greedy and want to avoid manually typing between each block.

All searches on the web point to PuTTY, I have been experimenting with auto hot key but not having any luck yet.

I wonder if there is room in the sketch on the MCU to receive a signal to do something a bit different, like link ~ to and active ctrl keypress?

I wonder if Fig8r is reading this? 

Carl.

Stuart Taylor

unread,
Mar 15, 2013, 2:10:28 PM3/15/13
to fign...@googlegroups.com
it would be fairly trivial to knock up a terminal emulator in VB and send a Ctrl+c (or any no printing char) using some sort of nomenclature, say <ETX> and the emulator transmit a \x03 in its place.

so you would have

1 edit
: code
: morecode
: loadsofcode
: nuffcode

<ETX>

w


David

unread,
Mar 15, 2013, 2:57:19 PM3/15/13
to fign...@googlegroups.com
Personally after having tried lots of supposedly good terminal emulators for talking to microcontrollers the one I use all the time is the Parallax Serial Terminal,
http://www.parallax.com/Portals/0/Downloads/sw/propeller/Parallax-Serial-Terminal.zip
it doesn't need installing and runs from anywhere, you can copy text and past it into the send window and it just gets sent, no hassle.
The next favourite is Br@ys Terminal
https://sites.google.com/site/terminalbpp/
Actually just seen it now has 64 com ports, previously it couldn't see high number USB com ports, so it might now become my favourite.
It also doesn't need installing and runs from anywhere, it will send files, it has macros and is designed not to mess up your code stream unlike lots of terminals do.
PuTTY and Hyperterminal and TerraTerm and others are all really designed to do something else other than talk to microcontrollers.
David

Stuart Taylor

unread,
Mar 15, 2013, 3:01:13 PM3/15/13
to fign...@googlegroups.com
Cheers David,

Br@ys Terminal is a new one on me, i'll add it to my "tools" list.

Stuart


carl

unread,
Mar 15, 2013, 3:12:56 PM3/15/13
to fign...@googlegroups.com
Thanks David and Stuart
I will look into that one soon. 
I have also installed ( not on win7 ) hyperteminal, I have used it for my amstrad nc200 and I must say I like it more than putty!

The read only ctrl character is elusive for now however.

Carl


Reply all
Reply to author
Forward
0 new messages