Motion doesn't resume after standby?

Not in my prop. https://github.com/profezzorn/ProffieOS/blob/63fd31430ab0b3c14fcc1c6b1c03e11b81605404/props/saber_fett263_buttons.h#L4330

Re-thinking about it you are right, I think RequestMotion() is always called, even without your prop file.

It must fail for some reason on Proffie v.1 since I’m unable to reproduce the issue on the Proffie v.2.

The two sabers are twins, the only difference is that the v.1 has a lighted AV button (managed by the second blade) while the v.2 has a plain button.
No differences in cabling other than that.

So, I still don’t know what’s causing this.
However, I created a potential workaround and checked in on github.
If motion runs into problem, this workaround will drain the i2c bus, reset it, then reset the motion chip and then re-start motion setup. In my tests I can ground the i2c bus, causing all sorts of weird errors and it will still keep going once the short is removed.

So please try the github proffieos version and see if that works better for you.

I downloaded the master version from GitHub but I’m getting this error when compiling:

In file included from F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\ProffieOS.ino:543:
F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\props\saber_fett263_buttons.h: In member function 'void SaberFett263Buttons::ToggleCCMode()':
F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\props\saber_fett263_buttons.h:1499:18: error: 'USES_RGB_ARG' was not declared in this scope; did you mean 'STYLES_RGB_ARG_H'?
 1499 |     ONCEPERBLADE(USES_RGB_ARG)
      |                  ^~~~~~~~~~~~
F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\common\preset.h:13:25: note: in definition of macro 'ONCEPERBLADE'
   13 | #define ONCEPERBLADE(F) F(1) F(2)
      |                         ^
In file included from F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\config\fencer_v6a.h:27,
                 from F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\ProffieOS.ino:573:
F:\Lightsabers\Arduino\Proffieboard\ProffieOS Master\ProffieOS\props\saber_fett263_buttons.h:1504:7: error: 'else' without a previous 'if'
 1504 |     } else {
      |       ^~~~
exit status 1
Errore durante la compilazione per la scheda Proffieboard.

Off topic : Kudos on the Greatest American Hero avatar!

1 Like

Ops, I almost fixed that correctly.
Try now.

Well, I loaded the latest version but it doesn’t look very good.

I let the saber alone for 5-10 minutes and the issue was there, no twist ignition.
So, I plugged in the USB and the board was spamming the motion chip auto-reboot.

I tried pressing the power button and the saber did like this:

  • played the power on sound
  • lighted the blade
  • no hum playing

Pressing again the power button it did:

  • played the power off sound
  • turned off the blade

Funniest than everything, the serial monitor is saying that hum and swings were playing, but it was not true. I’m using Rogue Commander to avoid strange behaviors with hybrid fonts.

21:23:09.920 -> Motion chip timeout, trying auto-reboot of motion chip!
21:23:09.920 -> I2CBUS: last_request = 912019 (now = 912019) i2c_detected_ = 1 used = 1
21:23:09.920 -> I2C STATE: 8
21:23:09.920 -> current: 536881688 id= 106 next= 0
21:23:09.920 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:09.920 -> last: 536881688 id= 106 next= 0
21:23:09.920 -> LSM6DS3HMotion chip timeout, trying auto-reboot of motion chip!
21:23:09.920 -> I2CBUS: last_request = 931279 (now = 931279) i2c_detected_ = 1 used = 1
21:23:09.920 -> I2C STATE: 8
21:23:09.920 -> current: 536881688 id= 106 next= 0
21:23:09.920 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:09.920 -> last: 536881688 id= 106 next= 0
21:23:09.920 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:10.260 -> Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
21:23:10.566 -> I2CBUS: last_request = 931921 (now = 931921) i2c_detected_ = 1 used = 1
21:23:10.566 -> I2C STATE: 8
21:23:10.566 -> current: 536881688 id= 106 next= 0
21:23:10.566 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:10.566 -> last: 536881688 id= 106 next= 0
21:23:10.566 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:10.906 -> Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
21:23:11.212 -> I2CBUS: last_request = 932563 (now = 932563) i2c_detected_ = 1 used = 1
21:23:11.212 -> I2C STATE: 8
21:23:11.212 -> current: 536881688 id= 106 next= 0
21:23:11.212 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:11.212 -> last: 536881688 id= 106 next= 0
21:23:11.212 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:11.450 -> EVENT: Power-Pressed#1 millis=932799
21:23:11.450 -> EVENT: Power-Pressed millis=932799
21:23:11.552 -> Motion chip ... EVENT: Power-Released#1 millis=933048
21:23:11.688 -> EVENT: Power-Released millis=933048
21:23:11.688 -> EVENT: Power-Shortclick#1 millis=933048
21:23:11.688 -> EVENT: Power-Shortclick millis=933048
21:23:11.756 -> EVENT: Power-SavedShortclick#1 millis=933100
21:23:11.756 -> Ignition.
21:23:11.790 -> unit = 0 vol = 0.00, Playing RgueCmdr/hum01.wav
21:23:11.790 -> channels: 1 rate: 44100 bits: 16
21:23:11.790 -> unit = 1 vol = 0.50, Playing RgueCmdr/out01.wav
21:23:11.790 -> channels: 1 rate: 44100 bits: 16
21:23:11.790 -> humstart: 100
21:23:11.790 -> unit = 3 vol = 0.00, Playing RgueCmdr/swingl02.wav
21:23:11.790 -> channels: 1 rate: 44100 bits: 16
21:23:11.790 -> unit = 2 vol = 0.00, Playing RgueCmdr/swingh02.wav
21:23:11.790 -> channels: 1 rate: 44100 bits: 16
21:23:11.858 -> Motion chip timeout, trying auto-reboot of motion chip!
21:23:11.858 -> I2CBUS: last_request = 933205 (now = 933205) i2c_detected_ = 1 used = 1
21:23:11.858 -> I2C STATE: 8
21:23:11.858 -> current: 536881688 id= 106 next= 0
21:23:11.858 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:11.858 -> last: 536881688 id= 106 next= 0
21:23:11.858 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:12.198 -> Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
21:23:12.504 -> I2CBUS: last_request = 933849 (now = 933849) i2c_detected_ = 1 used = 1
21:23:12.504 -> I2C STATE: 8
21:23:12.504 -> current: 536881688 id= 106 next= 0
21:23:12.504 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:12.504 -> last: 536881688 id= 106 next= 0
21:23:12.504 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:12.844 -> Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
21:23:13.150 -> I2CBUS: last_request = 934492 (now = 934492) i2c_detected_ = 1 used = 1
21:23:13.150 -> I2C STATE: 8
21:23:13.150 -> current: 536881688 id= 106 next= 0
21:23:13.150 -> LSM6DS3H: last_event_ 203292 LINE: 131
21:23:13.150 -> last: 536881688 id= 106 next= 0
21:23:13.150 -> LSM6DS3H: last_event_ 203292 LINE: 131

My fault, I added a debug line, then when I went to delete it, I removed the wrong line somehow. Should be fixed now.

I installed the latest Master version and looks very promising.
I used the saber yesterday night during the class and I didn’t have problems with missing motion detection.
I’ll use it again tonight and will report, but for now it seems that the issue might be solved.

Unfortunately it doesn’t exactly “solve” the problem, it just allows it to recover once the problem occurs.

I know it’s not an actual fix but a workaround.
However, if you consider it from the user experience point of view I did not have any trouble with gestures, so I call it a good thing.
There is high chance that we cannot identify the root cause, unless we are able to add some deep logging system feeding a file on the SD, to try and catch as much as possible of what is happening on the board.

My plan is to release a 6.6 version soon, and have this workaround be a part of it.