Using the sa22c_buttons there is a battery voltage check by triple-clicking the button on a one- button saber. Is there a way to edit the code so that it say percentage instead of volts?
I think this is the code section for the battery level.
Using the sa22c_buttons there is a battery voltage check by triple-clicking the button on a one- button saber. Is there a way to edit the code so that it say percentage instead of volts?
I think this is the code section for the battery level.
sa22c’s prop hasn’t been updated since OS5, I merged his 1 button controls into my prop starting in OS6 and already have spoken battery updated to use the Sound Library instead of talkie.
I would recommend just switching to my prop and using:
#define FETT263_SAY_BATTERY_PERCENT
Information on my prop and set up here:
I already did that and it worked great. To be honest, your prop was overwhelming me coming from sa22c. (please don’t be offended) I was just used to that prop. I know yours has far more features and is the one I should be using. I will go back to your prop and just learn it. There is a lot going on there so it will take me some time.
My prop is very customizable, you can disable or enable features as you need, the Config Helper tool linked at the top of the Prop page can help you set it up how you need
To answer this specifically, yes.
// Battery level
#if NUM_BUTTONS == 1
// 1 button
case EVENTID(BUTTON_POWER, EVENT_THIRD_SAVED_CLICK_SHORT, MODE_OFF):
#else
// 2 and 3 button
case EVENTID(BUTTON_AUX, EVENT_FIRST_HELD_LONG, MODE_OFF):
#endif
talkie.SayNumber((int)roundf(battery_monitor.battery_percent() * 10) % 100);
talkie.Say(spPERCENT);
return true;