Skip to content

Conversation

nissyyyb4b4
Copy link

@nissyyyb4b4 nissyyyb4b4 commented Jul 16, 2025

BLESpam

Fixed the ble_spam.cpp file. It was using the wrong payload (AppleJuice) for SourApple.

Visual Updates

Added a smooth sleep and dim where you can turn it on and off in the config.

Copy link
Contributor

@emericklaw emericklaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few missing check for the device LED.

Since Bruce also targets devices with small flash for optimisation reasons as much code as possible needs to be removed when not required for all devices.

For example there are still variables being defined to calculate LED dimming, this are not needed when the device is not using LEDs.

Final step would be to change the functions to not have start/endLed when not on an LED device.

fadeAll(int startDisp, int startLed, int endDisp, int endLed);

It might be worth when you have made these change to try and compile locally for the M5 Stick which does not have LEDs to check it still compiles with no errors.

Comment on lines 19 to 20
// Forward declaration
static void fadeAll(int startDisp, int startLed, int endDisp, int endLed);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the powerSave.h

if (elapsed >= (unsigned long)fadeDuration) {
// final state
setBrightness(fadeEndDisp, false);
setLedBrightness(fadeEndLed);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed checking if device has LED.


if (fadingIn) {
// After wake‑up fade completes:
ledSetup();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed checking if device has LED.

int d = fadeStartDisp + int((fadeEndDisp - fadeStartDisp) * t);
int l = fadeStartLed + int((fadeEndLed - fadeStartLed) * t);
setBrightness(d, false);
setLedBrightness(l);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed checking if device has LED.

#ifdef HAS_RGB_LED
setLedBrightness(bruceConfig.ledBright);
#endif
ledSetup();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed checking if device has LED.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theres problems in the new commit. Im sorry about that just dont use github that often. I will work on it when i get home, im also working on the config menu as u can see. But i commited everything on accident. When i get home ill fix everything. Sorry again.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everthing is good and i also cleaned up the menus

@Huzzla101
Copy link

Huzzla101 commented Jul 17, 2025 via email

@Huzzla101
Copy link

Huzzla101 commented Jul 17, 2025 via email

@pimentelleo
Copy link
Contributor

pimentelleo commented Jul 25, 2025

Why did you removed a lot of comments?

@bmorcelli
Copy link
Collaborator

with your changes, the BLE Spams are still working?

@pimentelleo
Copy link
Contributor

with your changes, the BLE Spams are still working?

I did tested and seems not working like before, but we need more devices to test since updated devices, have updated security patches.

@bmorcelli
Copy link
Collaborator

Move it to the "dev" brench

@nissyyyb4b4
Copy link
Author

with your changes, the BLE Spams are still working?

yes they do, i basically fixed the payload mismatch and i believe i optimized it a little (im not sure since i havent worked on my t embed since i made the last changes to this request)

@nissyyyb4b4 nissyyyb4b4 changed the base branch from main to dev September 20, 2025 04:51
@nissyyyb4b4
Copy link
Author

Move it to the "dev" brench

done, just please check the conflict's and notify me if i merged something the wrong way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants