Skip to content

Commit

Permalink
ajout de configuredByClient
Browse files Browse the repository at this point in the history
  • Loading branch information
cinosh07 committed Mar 16, 2023
1 parent 3dc70f8 commit 3c46645
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Slider-Firmware/lib/slider/serial_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ void displayEncoderReadyMessage(int b) {
}


void sendControllerReadyMessage() {
void sendControllerReadyMessage(bool intervalMode) {
String controllerType = "Slider Controller ready !";
if (intervalMode) {
controllerType = "Intervalometer ready!";
}
Serial.println("");
Serial.println("**********************************");
Serial.println("Slider controller ready!");
Serial.println(controllerType);
Serial.println("**********************************");
Serial.println("");
}
Expand Down
2 changes: 1 addition & 1 deletion Slider-Firmware/lib/slider/websocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventTyp
if (type == WS_EVT_CONNECT)
{
sendWebsocketReadyMessage();
client->text("{\"COMMAND_STATUS\":" + (String)commandStatus + "}");
client->text("{\"COMMAND_STATUS\":" + (String)commandStatus + ", \"INTERVALOMETER_MODE\":"+config.intervalMode+"}");
globalClient = client;
}
else if (type == WS_EVT_DISCONNECT)
Expand Down
2 changes: 1 addition & 1 deletion Slider-Firmware/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void setup()
motorsBegin();
}

sendControllerReadyMessage();
sendControllerReadyMessage(config.intervalMode);
}
}

Expand Down

0 comments on commit 3c46645

Please sign in to comment.