Re: [Flashforth-devel] TeraTerm Macro for Upload to FF
Brought to you by:
oh2aun
From: om1zz <om...@vo...> - 2015-05-18 20:57:32
|
Does the FF send a new line when ready to receive an another line? ______________________________________________________________ > Od: Mikael Nordman <mik...@fl...> > Komu: <fla...@li...> > Datum: 18.05.2015 22:42 > Předmět: Re: [Flashforth-devel] TeraTerm Macro for Upload to FF > >You could try using > > waitln "" > >to wait for the newline instead of OK > >BR Mike > > >On 18.05.2015 21:52, om1zz wrote: >> This is a quick hack for TerTerm - Upload to FF, while waiting on OK >> (sync) and interrupting the upload when FF sends ?? (currently only >> ?). The serial settings comes from the active TT session. >> Tried at 921k, it works, but not fully tested, as I do not have OK at >> end of each line from FF, so it waits 500ms and continues. >> With OK it will immediately follow with the next line. >> The FF decides when it sends the OK upon receive of the line - that >> establishes the syncing with Terminal. >> During a normal TT session click on Control>Macro, select this Macro >> (save below source to ie. file "FFupload.ttl"), select file to upload >> and select if you want to skip empty lines. >> >> >> ; TeraTerm Macro Script for FlashForth Upload >> ; Serial is set within the active TT session >> ; Opens a file, reads each line, and sends the line to FF >> ; while waiting on "OK" or "??" after the \r\n sent >> ; IgorM 5/2015 >> >> :Main >> Yes = 1 ; for YesNoBox result >> No = 0 ; for YesNoBox result >> BlankLine = 0 >> call OpenFile >> call ReadFile >> call CloseFile >> END >> >> :OpenFile >> FileNameBox 'Choose the file to upload' >> FileChosen = result >> if FileChosen = Yes then >> FileOpen fhandle inputstr 0 >> else >> end >> endif >> RETURN >> >> :ReadFile >> YesNoBox 'Do you want to skip blank lines?' 'Skip blanks?' >> SkipBlanks = result >> >> while 1 >> >> ; Read a line from the file.. >> >> filereadln fhandle line >> EndOfFile = result >> >> if EndOfFile = Yes then >> break >> endif >> >> StrLen line >> LineLen = result >> >> if SkipBlanks = Yes then >> if LineLen = BlankLine then >> continue >> endif >> endif >> >> sendln line >> >> timeout = 0 ; 0 secs >> mtimeout = 300 ; 300msecs >> wait "OK" "??" ; wait on OK or error >> ;if result = 0 break ; timeout, currently it simply timeouts >> ;if result = 1 goto ok ; OK detected - sync >> if result = 2 break ; exit if ?? from FF >> >> ; Repeat until the end of the file. >> >> endwhile >> RETURN >> >> :CloseFile >> FileClose fhandle >> RETURN >> ;----------------------------------------------------------- >> >> I. >> >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across >> Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable >> Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > >------------------------------------------------------------------------------ >One dashboard for servers and applications across Physical-Virtual-Cloud >Widest out-of-the-box monitoring support with 50+ applications >Performance metrics, stats and reports that give you Actionable Insights >Deep dive visibility with transaction tracing using APM Insight. >http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |