If the code hasn't been touched in this long, its probably release-worthy.

This commit is contained in:
2022-06-11 11:02:27 +02:00
parent 0c9eb831dd
commit d14fa7fde1
59 changed files with 1610 additions and 842 deletions

View File

@@ -26,7 +26,7 @@ BluetoothSerialTelemetry::read()
// Overwrite the '*' character, to leave us with a complete command
commandBuf[cmdSize-1] = 0;
//Log.notice("Bluetooth read %s", commandBuf);
Log.verbose("Bluetooth read %s", commandBuf);
if (commandBuf[0] == 'R') {
m_color = CRGB(std::atoi(&commandBuf[1]), m_color.g, m_color.b);
@@ -49,6 +49,12 @@ BluetoothSerialTelemetry::read()
return InputEvent{InputEvent::SetPower, 0};
} else if (commandBuf[0] == 'p') {
return InputEvent{InputEvent::SetPattern, &commandBuf[1]};
} else if (commandBuf[0] == 'b') {
return InputEvent::BeatDetect;
} else if (commandBuf[0] == 'c') {
return InputEvent{InputEvent::SetDisplayLength, std::atoi(&commandBuf[1])};
} else if (commandBuf[0] == 'Y') {
return InputEvent::SaveConfigurationRequest;
} else if (commandBuf[0] == 'A') {
char* axisVal = strtok(&commandBuf[1], ",");
const uint8_t accelX = std::atof(axisVal) * 10;
@@ -75,12 +81,13 @@ BluetoothSerialTelemetry::read()
void
BluetoothSerialTelemetry::onStart()
{
Log.notice("Starting up Bluetooth...");
Log.trace("Starting up Bluetooth...");
if (m_serial.begin(Platform::deviceName())) {
Log.notice("Bluetooth started!");
Log.notice("Bluetooth started! Device name is %s", Platform::deviceName());
} else {
Log.warning("Bluetooth could not be started!");
}
}
STATIC_ALLOC(BluetoothSerialTelemetry);
STATIC_TASK(BluetoothSerialTelemetry);