Mercurial > public > hwos_code
comparison src/customview.asm @ 628:cd58f7fc86db
3.05 stable work
| author | heinrichsweikamp |
|---|---|
| date | Thu, 19 Sep 2019 12:01:29 +0200 |
| parents | c40025d8e750 |
| children | 185ba2f91f59 |
comparison
equal
deleted
inserted
replaced
| 627:bf5fee575701 | 628:cd58f7fc86db |
|---|---|
| 1 ;============================================================================= | 1 ;============================================================================= |
| 2 ; | 2 ; |
| 3 ; File customview.asm combined next generation V3.03.2 | 3 ; File customview.asm combined next generation V3.03.5 |
| 4 ; | 4 ; |
| 5 ; Custom Views in Surface and Dive Mode | 5 ; Custom Views in Surface and Dive Mode |
| 6 ; | 6 ; |
| 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
| 8 ;============================================================================= | 8 ;============================================================================= |
| 96 surf_customview_toggle: | 96 surf_customview_toggle: |
| 97 bcf switch_right ; clear button event | 97 bcf switch_right ; clear button event |
| 98 incf active_customview,F ; number of custom view to show | 98 incf active_customview,F ; number of custom view to show |
| 99 | 99 |
| 100 IFDEF _compass | 100 IFDEF _compass |
| 101 movlw .6 ; index of surface custom view compass | |
| 102 cpfseq active_customview ; will compass be shown in custom view? | |
| 103 call I2C_sleep_accelerometer ; NO - stop accelerometer | |
| 104 movlw .6 ; index of surface custom view compass | 101 movlw .6 ; index of surface custom view compass |
| 105 cpfseq active_customview ; will compass be shown in custom view? | 102 cpfseq active_customview ; will compass be shown in custom view? |
| 106 call I2C_sleep_compass ; NO - stop compass | 103 call I2C_sleep_compass ; NO - stop compass |
| 107 ENDIF | 104 ENDIF |
| 108 | 105 |
| 232 bra customview_toggle_exit ; done | 229 bra customview_toggle_exit ; done |
| 233 | 230 |
| 234 | 231 |
| 235 surf_customview_init_view6: ; view 6: compass | 232 surf_customview_init_view6: ; view 6: compass |
| 236 IFDEF _compass | 233 IFDEF _compass |
| 237 call I2C_init_accelerometer ; start accelerometer | |
| 238 call I2C_init_compass ; start compass | 234 call I2C_init_compass ; start compass |
| 239 call TFT_surface_compass_mask ; show compass mask | 235 call TFT_surface_compass_mask ; show compass mask |
| 240 bra customview_toggle_exit ; done | 236 bra customview_toggle_exit ; done |
| 241 ELSE | 237 ELSE |
| 242 bra surf_customview_toggle ; not available without compass compiled in, goto next view | 238 bra surf_customview_toggle ; not available without compass compiled in, goto next view |
| 420 ENDIF | 416 ENDIF |
| 421 | 417 |
| 422 menuview_view9: | 418 menuview_view9: |
| 423 btfsc FLAG_apnoe_mode ; in apnoe mode? | 419 btfsc FLAG_apnoe_mode ; in apnoe mode? |
| 424 bra menuview_toggle ; YES - goto next option | 420 bra menuview_toggle ; YES - goto next option |
| 425 STRCPY_PRINT "Layout" ; NO - print "Layout" | 421 STRCPY_TEXT_PRINT tDiveLayout ; NO - print "Layout" |
| 426 bra menuview_exit ; - done | 422 bra menuview_exit ; - done |
| 427 | 423 |
| 428 ;----------------------------------------------------------------------------- | 424 ;----------------------------------------------------------------------------- |
| 429 | 425 |
| 430 ; Show next dive mode custom view (and delete this flag) | 426 ; Show next dive mode custom view (and delete this flag) |
| 431 global dive_customview_toggle | 427 global dive_customview_toggle |
| 432 dive_customview_toggle: | 428 dive_customview_toggle: |
| 433 incf active_customview,F ; increment number of custom view to show | 429 incf active_customview,F ; increment number of custom view to show |
| 434 | 430 |
| 435 movlw index_compass_dm ; index of custom view compass | |
| 436 cpfseq active_customview ; will compass be shown in custom view? | |
| 437 call I2C_sleep_accelerometer ; NO - stop accelerometer | |
| 438 movlw index_compass_dm ; index of custom view compass | 431 movlw index_compass_dm ; index of custom view compass |
| 439 cpfseq active_customview ; will compass be shown in custom view? | 432 cpfseq active_customview ; will compass be shown in custom view? |
| 440 call I2C_sleep_compass ; NO - stop compass | 433 call I2C_sleep_compass ; NO - stop compass |
| 441 | 434 |
| 442 movlw index_cv_dm_max ; highest index in use in dive mode custom view | 435 movlw index_cv_dm_max ; highest index in use in dive mode custom view |
| 540 call TFT_gf_factors_mask ; YES - mask for GF factors (static only) | 533 call TFT_gf_factors_mask ; YES - mask for GF factors (static only) |
| 541 bra customview_toggle_exit ; - done | 534 bra customview_toggle_exit ; - done |
| 542 | 535 |
| 543 init_TFT_dive_compass: ; compass | 536 init_TFT_dive_compass: ; compass |
| 544 IFDEF _compass | 537 IFDEF _compass |
| 545 call I2C_init_accelerometer ; start accelerometer | |
| 546 call I2C_init_compass ; start compass | 538 call I2C_init_compass ; start compass |
| 547 call TFT_dive_compass_mask ; show compass mask | 539 call TFT_dive_compass_mask ; show compass mask |
| 548 bra customview_toggle_exit ; done | 540 bra customview_toggle_exit ; done |
| 549 ELSE | 541 ELSE |
| 550 bra dive_customview_toggle ; not available without compass compiled in, goto next view | 542 bra dive_customview_toggle ; not available without compass compiled in, goto next view |
