Mercurial > public > hwos_code
comparison src/compass_ops.asm @ 631:185ba2f91f59
3.09 beta 1 release
author | heinrichsweikamp |
---|---|
date | Fri, 28 Feb 2020 15:45:07 +0100 |
parents | 237931377539 |
children | 4050675965ea |
comparison
equal
deleted
inserted
replaced
630:4cd81bdbf15c | 631:185ba2f91f59 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File compass_ops.asm combined next generation V3.06.1 | 3 ; File compass_ops.asm combined next generation V3.08.8 |
4 ; | 4 ; |
5 ; Compass Operations | 5 ; Compass Operations |
6 ; | 6 ; |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
8 ;============================================================================= | 8 ;============================================================================= |
15 #include "wait.inc" | 15 #include "wait.inc" |
16 #include "surfmode.inc" | 16 #include "surfmode.inc" |
17 #include "divemode.inc" | 17 #include "divemode.inc" |
18 #include "math.inc" | 18 #include "math.inc" |
19 #include "convert.inc" | 19 #include "convert.inc" |
20 #include "start.inc" | |
20 | 21 |
21 | 22 |
22 IFDEF _compass | 23 IFDEF _compass |
23 | 24 |
24 | 25 |
61 extern compass | 62 extern compass |
62 extern compass_reset_calibration | 63 extern compass_reset_calibration |
63 extern compass_add_calibration | 64 extern compass_add_calibration |
64 extern compass_solve_calibration | 65 extern compass_solve_calibration |
65 | 66 |
66 extern option_save_all | 67 extern option_check_and_store_all |
67 | 68 |
68 | 69 |
69 compass_ops code | 70 compass_ops code |
70 | 71 |
71 ;============================================================================= | 72 ;============================================================================= |
357 | 358 |
358 rcall TFT_compass_fast ; show values | 359 rcall TFT_compass_fast ; show values |
359 btfsc trigger_timeout ; timeout (calibration done)? | 360 btfsc trigger_timeout ; timeout (calibration done)? |
360 bra compass_calibration_exit ; YES - done | 361 bra compass_calibration_exit ; YES - done |
361 btfss trigger_full_second ; NO - new second begun? | 362 btfss trigger_full_second ; NO - new second begun? |
362 bra compass_calibration_loop2 ; NO - loop | 363 bra compass_calibration_loop2 ; NO - loop |
363 bcf trigger_full_second ; YES - clear flag | 364 bcf trigger_full_second ; YES - clear flag |
364 rcall TFT_show_timeout_testmode ; - show remaining time | 365 rcall TFT_show_timeout_testmode ; - show remaining time |
365 bra compass_calibration_loop2 ; - loop | 366 bra compass_calibration_loop2 ; - loop |
366 | 367 |
367 compass_calibration_exit: | 368 compass_calibration_exit: |
370 call compass_solve_calibration ; calculate calibration factors (C-code) | 371 call compass_solve_calibration ; calculate calibration factors (C-code) |
371 banksel common ; back to bank common | 372 banksel common ; back to bank common |
372 | 373 |
373 call request_speed_normal ; request CPU speed change to normal speed | 374 call request_speed_normal ; request CPU speed change to normal speed |
374 | 375 |
375 call option_save_all ; save all settings into EEPROM | 376 bsf options_changed ; flag that option values have changed |
376 movlw .6 | 377 bsf restart_fast ; request to skip logos and waits on restart |
377 movff WREG,customview_surfmode ; set to compass view... | 378 |
378 goto surfloop ; ...and exit | 379 movlw .6 ; coding for surface compass view |
380 movff WREG,customview_surfmode ; set to compass view to show | |
381 | |
382 goto restart ; done | |
379 | 383 |
380 ;----------------------------------------------------------------------------- | 384 ;----------------------------------------------------------------------------- |
381 | 385 |
382 TFT_compass_fast: | 386 TFT_compass_fast: |
383 WIN_TINY .0,.50 | 387 WIN_TINY .0,.50 |