JXCT Soil Sensor 7-in-1 v3.4.9 (June 2025)
Professional IoT soil monitoring system with ESP32, Modbus RTU, MQTT, and advanced compensation algorithms
Загрузка...
Поиск...
Не найдено
Файл thingspeak_client.cpp
#include <WiFiClient.h>
#include "thingspeak_client.h"
#include "modbus_sensor.h"
#include "wifi_manager.h"
#include <ThingSpeak.h>
#include "jxct_device_info.h"
#include "jxct_config_vars.h"
#include "jxct_format_utils.h"
#include "logger.h"
#include <NTPClient.h>
#include <ctype.h>

См. исходные тексты.

Функции

static void trim (char *s)
 
const char * getThingSpeakLastPublish ()
 
const char * getThingSpeakLastError ()
 
void setupThingSpeak (WiFiClient &client)
 
bool sendDataToThingSpeak ()
 

Переменные

NTPClient * timeClient
 
const char * THINGSPEAK_API_URL = "https://api.thingspeak.com/update"
 
static unsigned long lastTsPublish = 0
 
static int consecutiveFailCount = 0
 
static char thingSpeakLastPublishBuffer [32] = "0"
 
static char thingSpeakLastErrorBuffer [64] = ""
 

Функции

◆ getThingSpeakLastError()

const char * getThingSpeakLastError ( )

См. определение в файле thingspeak_client.cpp строка 44

Перекрестные ссылки thingSpeakLastErrorBuffer.

Используется в sendHealthJson() и sendServiceStatusJson().

◆ getThingSpeakLastPublish()

const char * getThingSpeakLastPublish ( )

См. определение в файле thingspeak_client.cpp строка 40

Перекрестные ссылки thingSpeakLastPublishBuffer.

Используется в sendHealthJson() и sendServiceStatusJson().

◆ sendDataToThingSpeak()

bool sendDataToThingSpeak ( )

◆ setupThingSpeak()

void setupThingSpeak ( WiFiClient & client)

См. определение в файле thingspeak_client.cpp строка 49

Используется в setup().

◆ trim()

static void trim ( char * s)
static

См. определение в файле thingspeak_client.cpp строка 21

Используется в sendDataToThingSpeak().

Переменные

◆ consecutiveFailCount

int consecutiveFailCount = 0
static

См. определение в файле thingspeak_client.cpp строка 18

Используется в sendDataToThingSpeak().

◆ lastTsPublish

unsigned long lastTsPublish = 0
static

См. определение в файле thingspeak_client.cpp строка 17

Используется в sendDataToThingSpeak().

◆ THINGSPEAK_API_URL

const char* THINGSPEAK_API_URL = "https://api.thingspeak.com/update"

См. определение в файле thingspeak_client.cpp строка 15

◆ thingSpeakLastErrorBuffer

char thingSpeakLastErrorBuffer[64] = ""
static

См. определение в файле thingspeak_client.cpp строка 37

Используется в getThingSpeakLastError() и sendDataToThingSpeak().

◆ thingSpeakLastPublishBuffer

char thingSpeakLastPublishBuffer[32] = "0"
static

См. определение в файле thingspeak_client.cpp строка 36

Используется в getThingSpeakLastPublish() и sendDataToThingSpeak().

◆ timeClient

NTPClient* timeClient
extern

См. определение в файле main.cpp строка 43