ProffieOS v6.x ALPHA testing

HI ALL,

edit, realised why it was doing that. I had downloaded the latest master.zip (5 minutes ago) and I’m getting this error.

Arduino: 1.8.16 (Linux), Board: "Proffieboard V2, Serial + WebUSB, SDCARD (SPI), 80 MHz, Smallest Code"











In file included from /home/maxb/Documents/ProffieOS/sound/sound.h:86,
                 from /home/maxb/Documents/ProffieOS/ProffieOS.ino:384:
/home/maxb/Documents/ProffieOS/props/saber_fett263_buttons.h: In member function 'virtual void GestureControlFile::iterateVariables(ConfigFile::VariableOP*)':
/home/maxb/Documents/ProffieOS/common/config_file.h:161:74: error: expected primary-expression before ')' token
  161 | #define CONFIG_VARIABLE2(X, DEF) DoVariableOp<decltype(X)>(op, #X, X, DEF)
      |                                                                          ^
/home/maxb/Documents/ProffieOS/props/saber_fett263_buttons.h:698:5: note: in expansion of macro 'CONFIG_VARIABLE2'
  698 |     CONFIG_VARIABLE2(lockupdelay, FETT263_LOCKUP_DELAY);
      |     ^~~~~~~~~~~~~~~~
exit status 1
Error compiling for board Proffieboard V2.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

my config

SOLUTION
cause is that I forgot to set a numberical value to FETT263_LOCKUP_DELAY,

set it to 200 to leave it as default.

1 Like

Ok, it’s now possible to show bullet counts on an OLED display.
Here’s what you would need:

This includes the display code, but doesn’t activate it.
May become the default in the future.

#define INCLUDE_SSD1306

Here’s how we activate the display:

#ifdef CONFIG_BOTTOM

DisplayHelper<128, uint32_t,
  BaseLayerOp<StandardDisplayController>,
  ClearRectangleOp<10, 80, 8, 24>,
  WriteBulletCountOp<10, 20, 5>
> display_controller;

SSD1306Template<128, uint32_t> display(&display_controller);
#endif

The DisplayHelper class takes a list of display operations, which works a lot like the Layers<> style. Currently, these operations are available:

Two different base layers:

  1. BaseLayerOp<StandardDisplayController>
  2. ClearScreenOp

The first one makes it work like a standard display controller (shows, font.bmp, messages, etc., the second one just makes it black.

ClearRectangleOp<x1, x2, y1, y2>

This op clears a rectangle on the screen.

WriteBulletCountOp<x, y, digits>

Writes the current bullet count at the specified location.

IfImageOp<OP>

This executes OP if the base layer is showing an image, but not otherwise.
The idea is that you could have a bullet count that draws over images, but not messages and battery monitors.

We will probably need more display OPs real soon for other purposes…
In 7.x I plan to make it possible to specify a different display controller for each preset, essentially making it a “style” for the display.

2 Likes

I’m getting a strange occurrence… sometimes when I double click and accidentally turn on the lightsaber my hum is silent and I can’t turn off my saber.

All the presets are v5 presets

I had a video but it’s not letting me upload it.

When I turn on the track and then ignite the saber using the power button the hum and all the other sfx don’t work EXCEPT the triggered sounds using the buttons e.g. fett263_buttons.h like blast, lightning block, lockup and force effects. However turning off the saber doesn’t work and my AV switch stays on despite retraction is still working.

To turn off the light on the switch, I need to turn off the music and change preset.

I pulled out the battery and reseated it. I then tried to turn on the saber and on some of my presets I couldn’t get the sleep gesture to work.

Double-clicking mutes the saber in the standard prop. That’s not it is it?
If not, maybe it’s some variation of what sa22c is experiencing…
Does it say anything interesting in the serial monitor?

It is possible that the mute may have triggered but I would have to ask @Fett263 if it is muted functions is a double click with the last click being a long one.

I Reflashed the board because last night I was playing with EDIT mode. I’LL see if I can reproduce it later today with my fresh config.

Tested SSD1306 for idle.bmp.
Mass storage works after boot (still connected USB), screen shows “usb”.
Works great when plugging in USB, stopping idle.bmp.

Battery Meter used to just keep showing until IDLE_TIME_OFF, now the first few lines in case PLI turn the screen off after FontImageDuration. Personally I prefer the old way, but I’m not the Master nor the masses.

One hiccup though.
When there’s no font.bmp, but there is an idle.bmp, the screen message does not show. It jumps right to idle.bmp.
Good news: the offset message/preset thing is fixed!

1 Like

Double click and hold while off does muted in 1 button. Would need serial monitor to see what is happening with other effects. Tracks shouldn’t interfere with anything else unless maybe the SD speed is too slow?

1 Like

The latest output. At this point it’s clear that so long as I let the saber sit long enough, this motion error will occur. I can flash the saber with a new config and just leave it on my desk overnight and 100% of the time, if I turn the saber on after that period, there will be no motion detected and no hum plays.

Oddly this time out, leaving the saber on didn’t chew up the battery and the hum.wav stopped playing when I turned the saber off, which wasn’t the behaviour the last couple times.

Battery voltage: 3.98
Cycle counting enabled, top will work next time.
Playing kestis/hum/hum01.wav
channels: 1 rate: 44100 bits: 16
Ignition.
unit = 1 vol = 0.50, Playing kestis/out/out05.wav
channels: 1 rate: 44100 bits: 16
humstart: 1800
unit = 3 vol = 0.00, Playing kestis/swingl/swingl02.wav
channels: 1 rate: 44100 bits: 16
unit = 2 vol = 0.00, Playing kestis/swingh/swingh02.wav
channels: 1 rate: 44100 bits: 16
Audio DMA: 1.73%
Wav reading: 5.08%
Pixel DMA: 0.44%
LOOP: 0.32%
Motion: 0.00%
Global loops / second: 1815.20
High frequency loops / second: 2435.58
blade fps: 85.73
Acceleration measurements per second: 1649.57
Hybrid Font loop: 0.05%
WS2811_Blade loop: 9.98%
ClockControl loop: 0.18%
Booster loop: 0.13%
SDCard loop: 0.10%
Amplifier loop: 0.09%
LSM6DS3H loop: 0.10%
I2CBus loop: 0.05%
Parser loop: 80.44%
pow loop: 0.15%
SaberFett263Buttons loop: 0.68%
BatteryMonitor loop: 0.26%
Fusor loop: 0.10%
DAC loop: 0.02%
AudioDynamicMixer loop: 0.05%
MonitorHelper loop: 0.05%
Playing kestis/swingl/swingl02.wav
channels: 1 rate: 44100 bits: 16
Playing kestis/swingh/swingh02.wav
channels: 1 rate: 44100 bits: 16
Battery voltage: 3.98
I2CBUS: last_request = 28142395 (now = 28142395) i2c_detected_ = 1 used = 1
current: 536879528 id= 106 next= 0
LSM6DS3H: last_event_ 43132 LINE: 194
last: 536879528 id= 106 next= 0
LSM6DS3H: last_event_ 43132 LINE: 194
Motion requested: 1 (millis() - last_motion_request=12325)
Whut? :fusordump
 Accel={-0.16, -1.07, 0.87} (1.39) Gyro={27.75, -39.78, -43.02} (64.84) down={0.50, -0.25, 0.87} (1.03) mss={-6.51, -7.95, 0.08} (10.28)
 ready=0 swing speed=58.60 gyro slope=61.51 last_micros_ = 44132723 now = 2383358722
 acceleration extrapolator data:
 START=42504297 samples=20 S(t^2)=ovf sum={2.42, -8.90, 17.97} S(.)={1504355.62, -5541100.50, 11192265.00}
 start_copy=42504297 avg={0.12, -0.44, 0.90} slope={-0.00, -0.00, -0.00} avg_t=622688.06
 43132141  {0.12, -0.44, 0.89}
 43132747  {0.12, -0.44, 0.90}
 43121222  {0.12, -0.43, 0.90}
 43121829  {0.12, -0.44, 0.90}
 43122435  {0.13, -0.44, 0.89}
 43123042  {0.12, -0.44, 0.90}
 43123648  {0.12, -0.44, 0.91}
 43124255  {0.13, -0.45, 0.91}
 43124862  {0.12, -0.44, 0.90}
 43125468  {0.12, -0.44, 0.89}
 43126075  {0.11, -0.45, 0.89}
 43126682  {0.12, -0.45, 0.89}
 43127292  {0.12, -0.45, 0.90}
 43127895  {0.12, -0.45, 0.90}
 43128502  {0.13, -0.45, 0.90}
 43129108  {0.12, -0.44, 0.90}
 43129715  {0.12, -0.45, 0.91}
 43130321  {0.12, -0.45, 0.90}
 43130928  {0.12, -0.45, 0.90}
 43131534  {0.12, -0.45, 0.90}
 ready=1
 gyro extrapolator data:
 START=42504310 samples=20 S(t^2)=ovf sum={-15.26, -72.02, -34.79} S(.)={-9494560.00, -44855624.00, -21673306.00}
 start_copy=42504310 avg={-0.76, -3.60, -1.74} slope={0.00, -0.00, -0.00} avg_t=622687.44
 43132153  {-0.55, -3.42, -1.16}
 43132760  {-0.79, -4.33, -2.44}
 43121234  {-0.55, -3.23, -1.10}
 43121841  {-0.92, -4.03, -2.38}
 43122448  {-1.04, -3.17, -0.49}
 43123054  {-0.79, -3.78, -2.56}
 43123661  {-1.10, -2.93, -0.67}
 43124267  {-0.79, -3.78, -2.62}
 43124874  {-0.92, -2.87, -1.28}
 43125481  {-0.79, -4.39, -1.59}
 43126088  {-1.04, -2.93, -2.01}
 43126694  {-0.73, -4.70, -0.98}
 43127304  {-1.04, -2.50, -2.93}
 43127907  {-0.55, -4.52, -0.67}
 43128514  {-0.73, -2.38, -2.62}
 43129121  {-0.55, -4.52, -1.16}
 43129727  {-0.61, -2.75, -2.20}
 43130334  {-0.79, -4.58, -1.89}
 43130940  {-0.43, -2.87, -1.71}
 43131547  {-0.55, -4.33, -2.32}
 ready=1
Playing kestis/swingl/swingl02.wav
channels: 1 rate: 44100 bits: 16
Playing kestis/swingh/swingh02.wav
channels: 1 rate: 44100 bits: 16
Battery voltage: 3.97
Audio DMA: 9.47%
Wav reading: 29.84%
Pixel DMA: 2.16%
LOOP: 1.43%
Motion: 0.00%
Global loops / second: 1882.54
High frequency loops / second: 2468.53
blade fps: 80.91
Acceleration measurements per second: 1649.57
Hybrid Font loop: 0.21%
WS2811_Blade loop: 48.11%
ClockControl loop: 0.79%
Booster loop: 0.58%
SDCard loop: 0.44%
Amplifier loop: 0.38%
LSM6DS3H loop: 0.44%
I2CBus loop: 0.23%
Parser loop: 0.30%
pow loop: 0.65%
SaberFett263Buttons loop: 2.83%
BatteryMonitor loop: 1.19%
Fusor loop: 0.42%
DAC loop: 0.09%
AudioDynamicMixer loop: 0.24%
MonitorHelper loop: 0.21%
I2CBUS: last_request = 28174639 (now = 28174639) i2c_detected_ = 1 used = 1
current: 536879528 id= 106 next= 0
LSM6DS3H: last_event_ 43132 LINE: 194
last: 536879528 id= 106 next= 0
LSM6DS3H: last_event_ 43132 LINE: 194
Motion requested: 1 (millis() - last_motion_request=44570)
Playing kestis/hum/hum01.wav
channels: 1 rate: 44100 bits: 16
unit = 1 vol = 0.50, Playing kestis/in/in02.wav
channels: 1 rate: 44100 bits: 16
No sounds found: pstoff
Battery voltage: 3.98
Battery voltage: 3.98
1 Like

So it’s definitely stuck with the I2C bus locked somehow.
I found one possible explanation and fixed it. Let me know if it helps.

3 Likes

I was able to reproduce without the track player, yes it’s the muted. Plus I turned off gestures but then couldn’t turn it back on.

Ok, if you can get serial monitor for it we can take a look. Did you turn gestures off in menu or via gesture sleep? I can’t think of anything that would interfere with button so would need to see what’s being registered for clicks.

Be sure to pull new version just so you get the latest fixes.

1 Like

downloaded the last release. gestures looks fine. can’t reproduce. I think it’s cause I turned on the mute and turned off gestures.

and I was able to turn off gestures play tracks and turn everything off.

it looks to work perfectly I also put it in mute and I can’t reproduce it so it’s looking good.

UPDATE.

I think I identified the issue. When my battery hits about the 70% mark the weird mute issue and the turn off the saber still the sounds are playing.

Unfortunately I can’t have the battery and usb cable and battery connected at the same time. Hence why I can’t reproduce with the serial monitor.

I wonder if it’s not so much the battery as it is time like what sa22c has reported?

@profezzorn thoughts?

1 Like

You’re encountering the same issue I am. Something is causing the motion chip to stop responding, which disables gestures, stops the hum from playing because there is no motion values to set volume, etc. That said, there is still a bug where the hum will keep playing after the saber is off, but I don’t think that’s necessarily related to the motion issues.

1 Like

Unfortunately, the fix didn’t correct the problem. Still seeing the same ‘no motion’ stuff after the saber is left sitting for a prolonged period.

Note that the hum STILL plays in the console output when the saber is off.

Style RAM = 3548
Scanning sound font: pain done
Scanning sound font: common done
WARNING, wav player still referenced!
Activating polyphonic font.
Activating SmoothSwing V2
Accent Swings Enabled.
Polyphonic swings: 16
Monophonic swings: 0
Accent Slashes NOT Detected: 
unit = 0 vol = 0.50, Playing pain/font/font.wav
channels: 1 rate: 44100 bits: 16
Saving Global State
Amplifier off.
Unmounting SD Card.
Cycle counting enabled, top will work next time.
Ignition.
unit = 0 vol = 0.50, Playing pain/preon/preon2.wav
channels: 1 rate: 44100 bits: 16
Playing pain/out/out04.wav
channels: 1 rate: 44100 bits: 16
unit = 2 vol = 0.00, Playing pain/hum/hum01.wav
channels: 1 rate: 44100 bits: 16
humstart: 1800
unit = 3 vol = 0.00, Playing pain/swingl/swingl01.wav
channels: 1 rate: 44100 bits: 16
unit = 4 vol = 0.00, Playing pain/swingh/swingh01.wav
channels: 1 rate: 44100 bits: 16
Battery voltage: 3.97
Playing pain/swingh/swingh01.wav
channels: 1 rate: 44100 bits: 16
I2CBUS: last_request = 4047125 (now = 4047125) i2c_detected_ = 1 used = 1
current: 536879528 id= 106 next= 0
LSM6DS3H: last_event_ 714572 LINE: 194
last: 536879528 id= 106 next= 0
LSM6DS3H: last_event_ 714572 LINE: 194
Motion requested: 1 (millis() - last_motion_request=7452)
Audio DMA: 1.89%
Wav reading: 6.03%
Pixel DMA: 0.56%
LOOP: 0.38%
Motion: 0.00%
Global loops / second: 1791.21
High frequency loops / second: 2461.31
blade fps: 85.54
Acceleration measurements per second: 1649.73
Hybrid Font loop: 0.06%
WS2811_Blade loop: 12.54%
ClockControl loop: 0.21%
Booster loop: 0.29%
SDCard loop: 0.22%
Amplifier loop: 0.15%
LSM6DS3H loop: 0.12%
I2CBus loop: 0.06%
Parser loop: 75.90%
pow loop: 0.17%
SaberFett263Buttons loop: 0.86%
BatteryMonitor loop: 0.32%
Fusor loop: 0.11%
DAC loop: 0.02%
AudioDynamicMixer loop: 0.06%
MonitorHelper loop: 0.06%
Playing pain/swingl/swingl01.wav
channels: 1 rate: 44100 bits: 16
 Accel={0.04, -0.36, 1.37} (1.42) Gyro={9.78, -8.26, 9.87} (16.17) down={0.15, -0.39, 0.99} (1.07) mss={-1.04, 0.29, 3.72} (3.87)
 ready=0 swing speed=12.87 gyro slope=16.18 last_micros_ = 715572707 now = 4053600367
 acceleration extrapolator data:
 START=713994047 samples=20 S(t^2)=ovf sum={1.62, -9.34, 17.92} S(.)={929333.13, -5351111.50, 10266811.00}
 start_copy=713994047 avg={0.08, -0.47, 0.90} slope={-0.00, 0.00, 0.00} avg_t=572936.44
 714570926  {0.09, -0.47, 0.89}
 714571533  {0.09, -0.46, 0.90}
 714572139  {0.08, -0.47, 0.90}
 714572746  {0.07, -0.47, 0.91}
 714561221  {0.08, -0.46, 0.89}
 714561827  {0.08, -0.47, 0.90}
 714562434  {0.09, -0.47, 0.90}
 714563040  {0.07, -0.46, 0.89}
 714563647  {0.08, -0.47, 0.89}
 714564254  {0.08, -0.47, 0.90}
 714564860  {0.08, -0.48, 0.89}
 714565467  {0.08, -0.46, 0.90}
 714566073  {0.08, -0.47, 0.89}
 714566680  {0.08, -0.47, 0.89}
 714567289  {0.09, -0.47, 0.89}
 714567893  {0.08, -0.47, 0.89}
 714568500  {0.07, -0.46, 0.91}
 714569106  {0.08, -0.46, 0.90}
 714569713  {0.08, -0.46, 0.89}
 714570320  {0.08, -0.46, 0.89}
 ready=1
 gyro extrapolator data:
 START=713994059 samples=20 S(t^2)=ovf sum={-16.36, -75.38, -32.53} S(.)={-9369181.00, -43188152.00, -18635818.00}
 start_copy=713994059 avg={-0.82, -3.77, -1.63} slope={0.00, -0.00, 0.00} avg_t=572936.63
 714570938  {-0.73, -3.91, -0.92}
 714571545  {-0.92, -4.03, -2.14}
 714572152  {-0.73, -3.91, -1.40}
 714572758  {-0.79, -3.85, -1.71}
 714561233  {-0.85, -3.66, -2.20}
 714561839  {-0.85, -4.09, -1.22}
 714562446  {-0.79, -3.72, -2.38}
 714563053  {-0.98, -3.78, -1.22}
 714563659  {-0.79, -3.72, -1.95}
 714564266  {-0.85, -3.66, -1.16}
 714564872  {-1.04, -4.09, -1.83}
 714565479  {-0.92, -3.66, -1.28}
 714566086  {-0.85, -3.60, -1.59}
 714566692  {-0.61, -3.66, -1.71}
 714567301  {-0.98, -3.48, -1.34}
 714567905  {-0.37, -3.91, -1.77}
 714568512  {-0.98, -3.60, -1.22}
 714569119  {-0.92, -3.78, -2.20}
 714569725  {-0.67, -3.60, -1.10}
 714570332  {-0.73, -3.66, -2.20}
 ready=1
unit = 0 vol = 0.50, Playing pain/in/in01.wav
channels: 1 rate: 44100 bits: 16
No sounds found: pstoff
Battery voltage: 3.97
Playing pain/hum/hum01.wav
channels: 1 rate: 44100 bits: 16
2 Likes

Ok then good to know. Thanks guys

What’s the summary of steps required to reproduce this? I’ll give it a shot too?

from what I understand plugin the usb to use serial monitor and play with it for about 30 minutes while on and then the gestures just stop working. @SA22C is that right?

capture the serial monitor

All I have to do is leave the saber sitting (without a kill key in, of course) for an hour or so. Like clockwork, the motion chip stops working.

I know it didn’t do this on 5.9 because this saber doesn’t have a kill key and I left it on my shelf for months, every time I took it down: worked like a charm.

1 Like