commit
84a432a30f
@ -309,7 +309,7 @@ void setup() {
|
||||
ESP_LOGI(TAG, "Starting GPS Feed...");
|
||||
xTaskCreatePinnedToCore(gps_loop, // task function
|
||||
"gpsloop", // name of task
|
||||
2048, // stack size of task
|
||||
4096, // stack size of task
|
||||
(void *)1, // parameter of the task
|
||||
1, // priority of the task
|
||||
&GpsTask, // task handle
|
||||
|
@ -16,8 +16,8 @@ esp_err_t mqtt_init(void) {
|
||||
// setup network connection
|
||||
WiFi.onEvent(NetworkEvent);
|
||||
ETH.begin();
|
||||
//WiFi.mode(WIFI_STA);
|
||||
//WiFi.begin("SSID", "PASSWORD");
|
||||
// WiFi.mode(WIFI_STA);
|
||||
// WiFi.begin("SSID", "PASSWORD");
|
||||
|
||||
// setup mqtt client
|
||||
mqttClient.begin(MQTT_SERVER, MQTT_PORT, netClient);
|
||||
@ -69,6 +69,8 @@ int mqtt_connect(const char *my_host, const uint16_t my_port) {
|
||||
ESP_LOGW(TAG, "MQTT server not responding, retrying later");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void NetworkEvent(WiFiEvent_t event) {
|
||||
@ -122,7 +124,7 @@ void mqtt_client_task(void *param) {
|
||||
if (mqttClient.connected()) {
|
||||
|
||||
char buffer[PAYLOAD_BUFFER_SIZE + 3];
|
||||
snprintf(buffer, msg.MessageSize + 3, "%s/%s", msg.MessagePort,
|
||||
snprintf(buffer, msg.MessageSize + 3, "%s/%u", msg.MessagePort,
|
||||
msg.Message);
|
||||
|
||||
if (mqttClient.publish(MQTT_OUTTOPIC, buffer)) {
|
||||
|
@ -32,7 +32,7 @@ static TaskHandle_t timeSyncProcTask;
|
||||
void timesync_init(void) {
|
||||
xTaskCreatePinnedToCore(timesync_processReq, // task function
|
||||
"timesync_proc", // name of task
|
||||
2048, // stack size of task
|
||||
4096, // stack size of task
|
||||
(void *)1, // task parameter
|
||||
3, // priority of the task
|
||||
&timeSyncProcTask, // task handle
|
||||
|
Loading…
Reference in New Issue
Block a user