Mercurial > public > hwos_code
comparison src/menu_processor.asm @ 113:f3062a611eef
Merge
author | heinrichsweikamp |
---|---|
date | Mon, 23 Jun 2014 16:14:33 +0200 |
parents | a5ea132770db |
children | 53409476a05f |
comparison
equal
deleted
inserted
replaced
112:a24581f0b372 | 113:f3062a611eef |
---|---|
20 #include "surfmode.inc" | 20 #include "surfmode.inc" |
21 #include "divemode.inc" | 21 #include "divemode.inc" |
22 #include "tft_outputs.inc" | 22 #include "tft_outputs.inc" |
23 #include "eeprom_rs232.inc" | 23 #include "eeprom_rs232.inc" |
24 #include "adc_lightsensor.inc" | 24 #include "adc_lightsensor.inc" |
25 #include "calibrate.inc" | |
25 | 26 |
26 ;NOTE: should be idenric in .inc and .asm ! | 27 ;NOTE: should be idenric in .inc and .asm ! |
27 #define MENU_LINES_MAX .7 ; Number of lines per screen? | 28 #define MENU_LINES_MAX .7 ; Number of lines per screen? |
28 #define MENU_TITLE_FONT WIN_STD ; Font should contains lower/UPPER alpha | 29 #define MENU_TITLE_FONT WIN_STD ; Font should contains lower/UPPER alpha |
29 #define MENU_LINE_FONT WIN_SMALL ; Font should contains lower/UPPER alpha | 30 #define MENU_LINE_FONT WIN_SMALL ; Font should contains lower/UPPER alpha |
318 btfsc switch_right | 319 btfsc switch_right |
319 bra do_line_menu ; Type dependent | 320 bra do_line_menu ; Type dependent |
320 btfsc switch_left | 321 btfsc switch_left |
321 bra next_line_menu | 322 bra next_line_menu |
322 | 323 |
324 btfss quarter_second_update ; 1/4 second? | |
325 bra menu_line_loop1 ; Not yet... | |
326 | |
327 call compute_ppo2 ; compute mv_sensorX and ppo2_sensorX arrays | |
328 btfsc menu_show_sensors2 ; In the "Calibrate" menu? | |
329 call TFT_menu_hud2 ; Yes, update mV data | |
330 bcf quarter_second_update ; Clear flag | |
331 | |
332 menu_line_loop1: | |
323 btfss onesecupdate ; New second | 333 btfss onesecupdate ; New second |
324 bra menu_line_loop2 ; not yet... | 334 bra menu_line_loop2 ; not yet... |
325 | 335 |
326 call timeout_surfmode ; timeout | 336 call timeout_surfmode ; timeout |
327 call set_dive_modes ; check, if divemode must be entered | 337 call set_dive_modes ; check, if divemode must be entered |
328 call get_battery_voltage ; gets battery voltage | 338 call get_battery_voltage ; gets battery voltage |
329 | 339 |
330 btfsc settime_setdate ; In the Set Time or Set Date menu? | 340 btfsc settime_setdate ; In the Set Time or Set Date menu? |
331 call TFT_show_time_date_menu ; Yes, update clock | 341 call TFT_show_time_date_menu ; Yes, update clock |
342 | |
332 btfsc menu_show_sensors ; In the "Sensors" menu? | 343 btfsc menu_show_sensors ; In the "Sensors" menu? |
333 call TFT_menu_hud ; Yes, update HUD data | 344 call TFT_menu_hud ; Yes, update HUD data |
334 | 345 |
335 bcf onesecupdate ; one second updates done | 346 bcf onesecupdate ; one second updates done |
336 | 347 |
341 goto restart ; Enter Divemode if required | 352 goto restart ; Enter Divemode if required |
342 | 353 |
343 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) | 354 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) |
344 bra menu_line_loop3 | 355 bra menu_line_loop3 |
345 btfsc vusb_in ; USB plugged in? | 356 btfsc vusb_in ; USB plugged in? |
346 goto comm_mode ; Start COMM mode | 357 call comm_mode ; Start COMM mode |
347 bra menu_line_loop4 | 358 bra menu_line_loop4 |
348 menu_line_loop3: | 359 menu_line_loop3: |
349 btfss vusb_in ; USB (still) plugged in? | 360 btfss vusb_in ; USB (still) plugged in? |
350 bcf enable_screen_dumps ; No, clear flag | 361 bcf enable_screen_dumps ; No, clear flag |
351 call rs232_get_byte | 362 call rs232_get_byte |