Mercurial > public > hwos_code
comparison src/logbook.asm @ 168:1784ab9362ca
BUGFIX: False max. temp in Logbook, false Bailout and Gas 6 flags in logbook
author | heinrichsweikamp |
---|---|
date | Mon, 29 Sep 2014 12:03:26 +0200 |
parents | 05f2100d2eb8 |
children | dcf3e08f31ac |
comparison
equal
deleted
inserted
replaced
167:05f2100d2eb8 | 168:1784ab9362ca |
---|---|
913 profile_display_skip_loop1: ; skips readings! | 913 profile_display_skip_loop1: ; skips readings! |
914 dcfsnz profile_temp2+0,F | 914 dcfsnz profile_temp2+0,F |
915 bra profile_display_loop3 ; check 16bit.... | 915 bra profile_display_loop3 ; check 16bit.... |
916 | 916 |
917 rcall profile_view_get_depth ; reads depth, temp and profile data | 917 rcall profile_view_get_depth ; reads depth, temp and profile data |
918 | |
919 btfsc end_of_profile ; end-of profile reached? | |
920 bra profile_display_loop_done ; Yes, skip all remaining pixels | |
921 | |
918 bra profile_display_skip_loop1 | 922 bra profile_display_skip_loop1 |
919 | 923 |
920 profile_display_loop3: | 924 profile_display_loop3: |
921 decfsz profile_temp2+1,F ; 16 bit x-scaler test | 925 decfsz profile_temp2+1,F ; 16 bit x-scaler test |
922 bra profile_display_skip_loop1 ; skips readings! | 926 bra profile_display_skip_loop1 ; skips readings! |
1234 bsf end_of_profile ; End found! Set Flag! Skip remaining pixels! | 1238 bsf end_of_profile ; End found! Set Flag! Skip remaining pixels! |
1235 return | 1239 return |
1236 | 1240 |
1237 profile_view_get_depth_new1: | 1241 profile_view_get_depth_new1: |
1238 btfsc event_occured ; Was there an event attached to this sample? | 1242 btfsc event_occured ; Was there an event attached to this sample? |
1239 rcall profile_view_get_depth_new2 ; Yes, get information about this event | 1243 rcall profile_view_get_depth_events ; Yes, get information about this event(s) |
1240 | 1244 |
1241 ;---- Read Tp°, if any AND divisor reached AND bytes available ----------- | 1245 ;---- Read Tp°, if any AND divisor reached AND bytes available ----------- |
1242 movf divisor_temperature,W ; Is Tp° divisor null ? | 1246 movf divisor_temperature,W ; Is Tp° divisor null ? |
1243 bz profile_view_get_depth_no_tp; Yes: no Tp° curve. | 1247 bz profile_view_get_depth_no_tp; Yes: no Tp° curve. |
1244 decf count_temperature,F ; Decrement tp° counter | 1248 decf count_temperature,F ; Decrement tp° counter |
1281 | 1285 |
1282 call ext_flash_byte_read_plus_0x20 | 1286 call ext_flash_byte_read_plus_0x20 |
1283 decf timeout_counter2,F | 1287 decf timeout_counter2,F |
1284 movff temp1,logbook_ceiling | 1288 movff temp1,logbook_ceiling |
1285 movff divisor_deco,count_deco ; Restart counter. | 1289 movff divisor_deco,count_deco ; Restart counter. |
1290 call ext_flash_byte_read_plus_0x20 ; Skip stop length | |
1291 decf timeout_counter2,F | |
1286 | 1292 |
1287 ;---- Read GF, if any AND divisor=0 AND bytes available ------------------ | 1293 ;---- Read GF, if any AND divisor=0 AND bytes available ------------------ |
1288 profile_view_get_depth_no_deco: | 1294 profile_view_get_depth_no_deco: |
1289 ; Then skip remaining bytes... | 1295 ; Then skip remaining bytes... |
1290 movf timeout_counter2,W ; number of additional bytes to ignore (0-127) | 1296 movf timeout_counter2,W ; number of additional bytes to ignore (0-127) |
1291 tstfsz timeout_counter2 ; Anything to skip? | 1297 tstfsz timeout_counter2 ; Anything to skip? |
1292 call incf_ext_flash_address0_0x20; Yes, increases bytes in ext_flash_address:3 with 0x200000 bank switching | 1298 call incf_ext_flash_address0_0x20; Yes, increases bytes in ext_flash_address:3 with 0x200000 bank switching |
1293 return | 1299 return |
1294 | 1300 |
1295 profile_view_get_depth_new2: | 1301 profile_view_get_depth_events: |
1296 clrf EventByte | 1302 clrf EventByte2 ; Clear EventByte2 |
1297 clrf EventByte2 ; Clear EventBytes | |
1298 call ext_flash_byte_read_plus_0x20 ; Read Event byte | 1303 call ext_flash_byte_read_plus_0x20 ; Read Event byte |
1299 movff temp1,EventByte ; store EventByte | 1304 movff temp1,EventByte ; store EventByte |
1300 decf timeout_counter2,F ; reduce counter | 1305 decf timeout_counter2,F ; reduce counter |
1301 | 1306 |
1302 btfss EventByte,7 ; Another Event byte? | 1307 btfss EventByte,7 ; Another Event byte? |
1305 movff temp1,EventByte2 ; store EventByte2 | 1310 movff temp1,EventByte2 ; store EventByte2 |
1306 decf timeout_counter2,F ; reduce counter | 1311 decf timeout_counter2,F ; reduce counter |
1307 bcf EventByte,7 ; Clear flag | 1312 bcf EventByte,7 ; Clear flag |
1308 | 1313 |
1309 profile_no_second_eventbyte: | 1314 profile_no_second_eventbyte: |
1310 ; Check Event flags in the EventByte | 1315 ; Check event flags in the EventBytes |
1311 btfsc EventByte,4 ; Manual Gas Changed? | 1316 btfsc EventByte,4 ; Manual Gas Changed? |
1312 rcall logbook_event1 ; Yes! | 1317 rcall logbook_event1 ; Yes! |
1313 btfsc EventByte,5 ; Stored Gas Changed? | 1318 btfsc EventByte,5 ; Stored Gas Changed? |
1314 rcall logbook_event4 ; Yes! | 1319 rcall logbook_event4 ; Yes! |
1315 btfsc EventByte,6 ; Setpoint Change? | 1320 btfsc EventByte,6 ; Setpoint Change? |