Merge pull request #661 from cyberman54/master

sync dev to master
This commit is contained in:
Verkehrsrot 2020-10-10 15:49:16 +02:00 committed by GitHub
commit 84a432a30f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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)) {

View File

@ -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