IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIIII
'IIIIIIIIII MOBILE ROBOT EVALUATION PROGRAM IIIIIIIIIIII
'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIIIII
'... (ich hab ma die Erklärung des Programs und Portdefines rausgenommen)...
'---------- INIT---------------
SYS PLM_SLOW:gosub SUBSYS_PWR_ON:REV_L=off:REV_R=off
beep 368,10,0
ause 50
PGM=1
'--------------------------------------------
'--- SPANNUNGSÜBERWACHUNG FÜR DEN AKKU ---
'--------------------------------------------
gosub LEDSOFF
SPEED_L=20:SPEED_R=20
#WATCH_AKKU
if SYS_VOLTS > 189 then goto L8ON
if SYS_VOLTS > 184 then goto L8BLINK
if SYS_VOLTS > 179 then goto L7ON
if SYS_VOLTS > 173 then goto L7BLINK
if SYS_VOLTS > 168 then goto L6ON
if SYS_VOLTS > 163 then goto L6BLINK
if SYS_VOLTS > 158 then goto L5ON
if SYS_VOLTS > 153 then goto L5BLINK
if SYS_VOLTS > 146 then goto L4ON
if SYS_VOLTS > 141 then goto L4BLINK
if SYS_VOLTS > 136 then goto L3ON
if SYS_VOLTS > 130 then goto L3BLINK
if SYS_VOLTS > 125 then goto L2ON
if SYS_VOLTS > 119 then goto L2BLINK
if SYS_VOLTS > 114 then goto L1ON
if SYS_VOLTS > 109 then goto L1BLINK
goto WATCH_AKKU
#L8ON
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON:gosub LED5ON:gosub LED6ON:gosub LED7ON
gosub LED8ON:goto WATCH_AKKU
#L8BLINK
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON:gosub LED5ON:gosub LED6ON:gosub LED7ON
gosub LED8ON
ause 20:gosub L8OFF
ause 20:goto WATCH_AKKU
#L7ON
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON:gosub LED5ON:gosub LED6ON
gosub LED7ON:goto WATCH_AKKU
#L7BLINK
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON:gosub LED5ON:gosub LED6ON
gosub LED7ON
ause 20:gosub L7OFF
ause 20:goto WATCH_AKKU
#L6ON
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON:gosub LED5ON:gosub LED6ON
goto WATCH_AKKU
#L6BLINK
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON:gosub LED5ON
gosub LED6ON
ause 20:gosub L6OFF
ause 20:goto WATCH_AKKU
#L5ON
gosub LED1ON:gosub LED2ON:gosub LED3ON:gosub LED4ON
gosub L5ON:goto WATCH_AKKU
#L5BLINK
gosub L1ON:gosub L2ON:gosub L3ON:gosub L4ON
gosub L5ON
ause 20:gosub L5OFF
ause 20:goto WATCH_AKKU
#L4ON
gosub L1ON:gosub L2ON:gosub L3ON
gosub L4ON:goto WATCH_AKKU
#L4BLINK
gosub L1ON:gosub L2ON:gosub L3ON
gosub L4ON
ause 20:gosub L4OFF
ause 20:goto WATCH_AKKU
#L3ON
gosub L1ON:gosub L2ON
gosub L3ON:goto WATCH_AKKU
#L3BLINK
gosub L1ON:gosub L2ON
gosub L3ON
ause 20:gosub L3OFF
ause 20:goto WATCH_AKKU
#L2ON
gosub L1ON:gosub L2ON:goto WATCH_AKKU
#L2BLINK
gosub L1ON
gosub L2ON
ause 20:gosub L2OFF
ause 20:goto WATCH_AKKU
#L1ON
gosub L1ON:goto WATCH_AKKU
#L1BLINK
gosub L1ON
ause 20:gosub L1OFF
ause 20:goto WATCH_AKKU
'IIIIIIIIIII LED DRIVER IIIIIIIIIIIIIIIII
#LED1ON
L1_F=on:goto EXTPORT_WRITE
#L1OFF
L1_F=off :goto EXTPORT_WRITE
#LED2ON
L2_F=on:goto EXTPORT_WRITE
#L2OFF
L2_F=off:goto EXTPORT_WRITE
#LED3ON
L3_F=on:goto EXTPORT_WRITE
#L3OFF
L3_F=off:goto EXTPORT_WRITE
#LED4ON
L4_F=on:goto EXTPORT_WRITE
#L4OFF
L4_F=off:goto EXTPORT_WRITE
#LED5ON
L5_F=on:goto EXTPORT_WRITE
#L5OFF
L5_F=off :goto EXTPORT_WRITE
#LED6ON
L6_F=on:goto EXTPORT_WRITE
#L6OFF
L6_F=off:goto EXTPORT_WRITE
#LED7ON
L7_F=on:goto EXTPORT_WRITE
#L7OFF
L7_F=off:goto EXTPORT_WRITE
#LED8ON
L8_F=on:goto EXTPORT_WRITE
#L8OFF
L8_F=off:goto EXTPORT_WRITE
#LEDSOFF
EXTPORT=EXTPORT and &H0F:goto EXTPORT_WRITE
#EXTPORT_WRITE
SYS SYSTEM
ulse STROBE:RETURN
'IIIIII SYSTEMROUTINEN COMM/NAV SYSTEM IIIII
#GET_IRDATA
SUBCMD=1:sys COMNAV:return
#SEND_IRDATA
SUBCMD=0:sys COMNAV:return
#RC5
SUBCMD=4:sys COMNAV:LBYTE= HBYTE and &HFC
HBYTE=00:SUBCMD=2:sys COMNAV:return
#RC5_INT
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE and &HFE)or 2
HBYTE=00:SUBCMD=2:sys COMNAV:return
#REC80
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE or &H01)and&HFD
HBYTE=00:SUBCMD=2:sys COMNAV:return
#REC80_INT
SUBCMD=4:sys COMNAV:LBYTE= (HBYTE or &H03)
HBYTE=00:SUBCMD=2:sys COMNAV:return
'IIIIII SYSTEMROUTINEN SYSTEM IIIIIIIIIIII
#NO_ACS_INT
SUBCMD=4:sys COMNAV:LBYTE= HBYTE and &HFB
HBYTE=00:SUBCMD=2:sys COMNAV:return
#ACS_INT_200
SUBCMD=4:sys COMNAV:LBYTE= HBYTE or &H04
HBYTE=50:SUBCMD=2:sys COMNAV:return
#SUBSYS_PWR_ON
sdio=on:sclio=on:strobe=off:EXTPORT=(EXTPORT and &HFE)or 8
sys SYSTEM:return
#SUBSYS_PWR_OFF
EXTPORT=(EXTPORT and &HF7)or 1:sys SYSTEM
deact sdio:deact sclio:return
#CLR_DISTANCE
SUBCMD=3:sys COMNAV:return
#L_DISTANCE
SUBCMD=6:sys COMNAV:return
#R_DISTANCE
SUBCMD=7:sys COMNAV:return
'---------COM/NAV GERÄTEREIBER -------------
'syscode "p5driv.s19"
Lesezeichen