comparison src/comm.asm @ 636:2737ddc643bb

3.11 release
author heinrichsweikamp
date Mon, 25 May 2020 17:35:30 +0200
parents 4050675965ea
children 8c1f1f334275
comparison
equal deleted inserted replaced
635:9a64914a8fca 636:2737ddc643bb
1 ;============================================================================= 1 ;=============================================================================
2 ; 2 ;
3 ; File comm.asm * combined next generation V3.09.5 3 ; File comm.asm * combined next generation V3.10.0
4 ; 4 ;
5 ; RS232 via USB 5 ; RS232 via USB
6 ; 6 ;
7 ; Copyright (c) 2012, JD Gascuel, HeinrichsWeikamp, all right reserved. 7 ; Copyright (c) 2012, JD Gascuel, HeinrichsWeikamp, all right reserved.
8 ;============================================================================= 8 ;=============================================================================
362 command_decode 0x72,comm_read_option ; r read an option value 362 command_decode 0x72,comm_read_option ; r read an option value
363 command_decode 0x77,comm_write_option ; w write an option value (into RAM) 363 command_decode 0x77,comm_write_option ; w write an option value (into RAM)
364 command_decode 0x78,comm_option_reset_all ; x reset all option values to their factory default 364 command_decode 0x78,comm_option_reset_all ; x reset all option values to their factory default
365 command_decode 0xFF,comm_service_exit ; exit comm mode 365 command_decode 0xFF,comm_service_exit ; exit comm mode
366 IFDEF _screendump 366 IFDEF _screendump
367 command_decode 0x6C,TFT_dump_screen ; l dump the screen contents 367 command_decode 0x6C,TFT_dump_screen_comm ; l dump the screen contents
368 ENDIF 368 ENDIF
369 369
370 btfss comm_service_mode ; service mode enabled? 370 btfss comm_service_mode ; service mode enabled?
371 bra comm_command_loop ; NO - ignore unrecognized command, back to command loop 371 bra comm_command_loop ; NO - ignore unrecognized command, back to command loop
372 372
383 IFDEF testloop_avail 383 IFDEF testloop_avail
384 command_decode 0x74,testloop ; t start raw-data test loop 384 command_decode 0x74,testloop ; t start raw-data test loop
385 ENDIF 385 ENDIF
386 386
387 bra comm_command_loop ; ignore unrecognized command, back to command loop 387 bra comm_command_loop ; ignore unrecognized command, back to command loop
388
389
390 ;-----------------------------------------------------------------------------
391 ; Screendump
392 ;
393 IFDEF _screendump
394 TFT_dump_screen_comm:
395 call TFT_dump_screen ; dump the screen contents and set screen_dump_avail
396 ;bra comm_service_exit ; exit comm mode
397 ENDIF
388 398
389 399
390 ;----------------------------------------------------------------------------- 400 ;-----------------------------------------------------------------------------
391 ; Exit Comm Mode 401 ; Exit Comm Mode
392 ; 402 ;
1154 ENDIF ; _helium 1164 ENDIF ; _helium
1155 1165
1156 ; check validity of type 1166 ; check validity of type
1157 movlw 0x14 ; last option index for gases 1167 movlw 0x14 ; last option index for gases
1158 cpfsgt lo ; received option index > end of gas range ? 1168 cpfsgt lo ; received option index > end of gas range ?
1159 bra comm_write_check_dil ; YES - check type for diluents 1169 bra comm_write_check_gas ; NO - check type for gases
1160 ;bra comm_write_check_gas ; NO - check type for gases 1170 ;bra comm_write_check_dil ; YES - check type for diluents
1171
1172 comm_write_check_dil:
1173 ; check validity of type for a diluent
1174 movlw num_dil_types ; load number of diluent types
1175 bra comm_write_check_com ; continue with common part
1161 1176
1162 comm_write_check_gas: 1177 comm_write_check_gas:
1163 ; check validity of type for a gas 1178 ; check validity of type for a gas
1164 movlw num_gas_types ; load number of gas types 1179 movlw num_gas_types ; load number of gas types
1165 bra comm_write_check_com ; continue with common part
1166
1167 comm_write_check_dil:
1168 ; check validity of type for a diluent
1169 movlw num_dil_types ; load number of diluent types
1170 ;bra comm_write_check_com ; continue with common part 1180 ;bra comm_write_check_com ; continue with common part
1171 1181
1172 comm_write_check_com: 1182 comm_write_check_com:
1173 cpfslt ex ; received type < max ? 1183 cpfslt ex ; received type < max ?
1174 bra comm_command_error ; NO - show error message and back to command loop 1184 bra comm_command_error ; NO - show error message and back to command loop