Mercurial > public > hwos_code
diff src/compass_ops.asm @ 645:070528a88715
3.16 release
author | heinrichsweikamp |
---|---|
date | Sun, 07 Nov 2021 12:39:23 +0100 |
parents | 7d8a4c60ec1a |
children | ef2ed7e3a895 |
line wrap: on
line diff
--- a/src/compass_ops.asm Mon May 24 18:41:51 2021 +0200 +++ b/src/compass_ops.asm Sun Nov 07 12:39:23 2021 +0100 @@ -313,6 +313,10 @@ ; btfsc compass_type1 ; compass1? ; bra compass_calibration_loop3 ; YES - skip gain stuff + banksel opt_compass_gain ; select bank options table + tstfsz opt_compass_gain ; =0? + bra $+4 ; No + bra compass_calibration_loop3 ; YES - skip gain stuff ; Test all axes for +4096 (Hi byte=16) banksel compass_DX ; select bank common2 movlw .16 @@ -337,19 +341,9 @@ cpfseq compass_DZ+1 bra $+4 bra compass_calibration_gainset - banksel common ; back to bank common - -; ; Three -; call I2C_RX_compass ; read compass -; call I2C_RX_accelerometer ; test accelerometer -; call compass_filter ; filter compass raw data -; -; ; Four times to get cleaner values -; call I2C_RX_compass ; read compass -; call I2C_RX_accelerometer ; test accelerometer -; call compass_filter ; filter compass raw data compass_calibration_loop3: + banksel common ; back to bank common ; and register only one value out of four: call compass_add_calibration ; check and store new max/min values (C-code) banksel common ; back to bank common