scrap of main program for user interface:

          if lastkey != lastpress  then   -- new command
              if lastKey =="*" then
                 rigMode = RIGMODE_RX
                 DrawClockFace(18,34,16, on)
                 clock_on = true
                 DrawMeterFace(40, 18, 24, on)
              elsif lastKey =="#" then
                  if rigMode == RIGMODE_REMOTE then
                     rigMode = RIGMODE_OFF
                  else
                      rigMode = RIGMODE_REMOTE
                  end if
              end if
             lastpress = lastkey



Then in the part that polls the radio every 250ms to 500ms approx
(depending on mode)
          if rigMode == RIGMODE_RX then
              CAT_FreqBCDRd(modMode,  rigfreq)
              if BCD4toString10 (rigFreq, rigFreqText)then
                  Lcd_setcursor(0,0)
                  LCD_double= on
                  print_string(lcd,rigFreqText)
                  LCD_double= off
                  lcd_setcursor(20,1)
                  LCD_bold = on
                  lcd="0"
                  LCD_bold = off
                  --print_string(lcd,MHz)
                  lcd_setcursor(10,7)
                  if RIG_ModeText(modMode,modmodeText) then
                     lcd= "n"
                  else
                     lcd=" "
                  end if
                  print_string(lcd,modmodeText)
                  DrawMeterNeedle(40, 18, 24, smeter, off)
                  --smeter is only 0 .. 15, x7 = 105, 14x7 = 98
                  smeter = CAT_RXstats(squelch, toneSql, discrim) *7
                  DrawMeterNeedle(40, 18, 24, smeter, on)
                  LCD_bold = on
                  lcd_setcursor(1,7)
                  if squelch then
                    lcd ="S"
                  else
                    lcd ="_"
                  end if
                  lcd = " "
                  if toneSql then
                    lcd ="T"
                  else
                    lcd ="_"
                  end if
                  lcd = " "
                  if discrim then
                    lcd ="D"
                  else
                    lcd ="_"
                  end if
                    LCD_bold = off
              end if



The radio is TTL serial at 38,400, 8 data, no parity and TWO stop
bits ...

In Remote mode all local polling for local LCD is off and local user
commands (scanning, transmit, enter frequency etc) are all off and the
Serial port is connected to USB serial. A Program on PC then using a
USB based virtual COM port can then remote control the Radio (Works
with FT817 Commander, but not with HRD, but some other USB <--> Serial
"magic" Rig boxes don''t work with HRD either).





-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to