Merge pull request #84 from bobbycar-graz/advanced_ble
Control ledstrip animation via ble
This commit is contained in:
@ -8,6 +8,9 @@
|
||||
#ifdef FEATURE_BLE
|
||||
#include <NimBLEDevice.h>
|
||||
#endif
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
#include "ledstrip.h"
|
||||
#endif
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
@ -241,6 +244,11 @@ void RemoteControlCallbacks::onWrite(NimBLECharacteristic* pCharacteristic)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
auto newBlinkAnimation = doc["anim"].as<int16_t>();
|
||||
if (blinkAnimation != newBlinkAnimation) blinkAnimation = newBlinkAnimation;
|
||||
#endif
|
||||
|
||||
modes::remoteControlMode.setCommand(RemoteCommand{
|
||||
.frontLeft = doc["fl"].as<int16_t>(),
|
||||
.frontRight = doc["fr"].as<int16_t>(),
|
||||
|
Reference in New Issue
Block a user