rvt / headtracker

Head Tracker using MPU6050/MPU9250 and ESP8266
BSD 3-Clause "New" or "Revised" License
30 stars 9 forks source link

calibration and zero do not work properly, calibration lead to crash(or wdt?) #9

Open Zhaosn opened 8 months ago

Zhaosn commented 8 months ago

calibration and zero do not work properly, the calibration problem can be solved inelegantly by changing the if in line 231 to always true. But "TRACK_PEEK_URI" always 0, so the zero button is useless.

change

if (hwTrack->isReady()) {
            doCalibrate = true;

to

 if (1) {
            doCalibrate = true;

or something seems crash when hit calibrate button in browser.

 Starting
*wm:AutoConnect
*wm:No wifi saved, skipping
*wm:AutoConnect: FAILED for  1 ms
*wm:StartAP with SSID:  WM_AutoConnectAP
*wm:AP IP address: 192.168.4.1
*wm:Starting Web Portal

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (28):
epc1=0x40205493 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffc30 end: 3fffffd0 offset: 0190
3ffffdc0:  4020f301 00000030 00000010 00000000
3ffffdd0:  0023002f 00000000 00000000 000f000f  
3ffffde0:  00000000 00000000 00000000 fffffffe
3ffffdf0:  3fff29c4 3fff2b20 00000000 40212d58
3ffffe00:  3fff0fd8 00000000 00000000 00000000  
3ffffe10:  3fff0fd8 3fff29c4 3fff2adc 40204fe1
3ffffe20:  00000000 3fff29c4 3fff296c 4020ce60
3ffffe30:  00000001 00000000 00000000 0023002f
3ffffe40:  00000000 00000000 3ffea4b4 3fff29a0  
3ffffe50:  00000000 00006e44 00000000 00000001
3ffffe60:  3fff0fd8 3fff29a0 00000000 00000000
3ffffe70:  3fff0fd8 3fff29a0 3fff296c 4020f096  
3ffffe80:  40220c14 00000000 00001388 40207322
3ffffe90:  3fff0fd8 3fff0fd8 3fff32d4 4021dc2b
3ffffea0:  3fff0fd8 00000000 402139be 00000000
3ffffeb0:  3fff0fd8 3fff0fd8 3fff0ed8 4020f301  
3ffffec0:  00303231 3fffff0c 3fffff18 00000000
3ffffed0:  00000000 00000000 3ffea4b4 00000001
3ffffee0:  3fff0fd8 00000000 402139be 00000000  
3ffffef0:  3fff0fd8 00000001 3fff0ed8 4020f721
3fffff00:  00000000 73646e6f 00000000 00000000
3fffff10:  000b000f 00000000 00000000 000b000f
3fffff20:  00000000 00000000 3fff0ed8 3fff0e84  
3fffff30:  3ffea8de 00000000 00000001 4020b920
3fffff40:  00000000 00000000 00000000 3fff0e84
3fffff50:  3fff0e68 3fff133c 3fff0ed8 40204d82  
3fffff60:  40201d54 3ffea6ed 4021fa10 4021fa08
3fffff70:  3ffea703 3ffea707 3ffea70d 3fff259c
3fffff80:  3fff25b8 3fff25b8 feefeffe feefeffe  
3fffff90:  3fff25b8 00000000 feefeffe feefeffe
3fffffa0:  feefeffe feefeffe feefeffe 3fff14c8
3fffffb0:  3fffdad0 00000000 3fff149c 40213b40
3fffffc0:  feefeffe feefeffe 3fffdab0 4010126d  
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8
tail 0
chksum 0x2b
csum 0x2b
v00069120
~ld

 Starting
*wm:AutoConnect
*wm:No wifi saved, skipping
*wm:AutoConnect: FAILED for  1 ms
*wm:StartAP with SSID:  WM_AutoConnectAP
*wm:AP IP address: 192.168.4.1
*wm:Starting Web Portal
Snipaste_2024-01-28_22-54-35

The correct setup process is to set the computer's IP address and port in this screen before setting up the AP, is that right? Because I can't get in this setup screen after connecting the ap (browser input 192.168.1.*). I can now get stable output after modifying it according to the above, but this strange crash is confusing me, the problem seems to be in the "hwTrack->isReady()", the doCalibrate and calibrateMpu() functions not causing the problem.