Merge pull request #9 from DmitryBorisenko33/platformio

Problems with unused vars fixed
This commit is contained in:
Dmitry Borisenko
2020-06-20 02:03:37 +02:00
committed by GitHub
3 changed files with 8 additions and 8 deletions

View File

@@ -198,7 +198,7 @@ void pinChange() {
//==========================================Модуль управления ШИМ===================================================
void pwm() {
static boolean flag = true;
//static boolean flag = true;
String pwm_number = sCmd.next();
String pwm_pin = sCmd.next();
String widget_name = sCmd.next();
@@ -469,7 +469,7 @@ void servoSet() {
String servo_state = sCmd.next();
int servo_state_int = servo_state.toInt();
int pin = jsonReadInt(configOptionJson, "servo_pin" + servo_number);
//int pin = jsonReadInt(configOptionJson, "servo_pin" + servo_number);
servo_state_int = map(servo_state_int,
jsonReadInt(configOptionJson, "s_min_val" + servo_number),
@@ -531,7 +531,7 @@ void mqttOrderSend() {
//Serial.print(all_line);
//Serial.print("->");
//Serial.println(order);
int send_status = client_mqtt.publish (all_line.c_str(), order.c_str(), false);
client_mqtt.publish (all_line.c_str(), order.c_str(), false);
}
void httpOrderSend() {

View File

@@ -166,13 +166,13 @@ void sendSTATUS(String topik, String state) {
topik = jsonReadStr(configSetupJson, "mqttPrefix") + "/" + chipID + "/" + topik + "/" + "status";
String json_ = "{}";
jsonWriteStr(json_, "status", state);
int send_status = client_mqtt.publish (topik.c_str(), json_.c_str(), false);
client_mqtt.publish (topik.c_str(), json_.c_str(), false);
}
//======================================CONTROL==================================================
void sendCONTROL(String id, String topik, String state) {
String all_line = jsonReadStr(configSetupJson, "mqttPrefix") + "/" + id + "/" + topik + "/control";
int send_status = client_mqtt.publish (all_line.c_str(), state.c_str(), false);
client_mqtt.publish (all_line.c_str(), state.c_str(), false);
}
//=====================================================ОТПРАВЛЯЕМ ВИДЖЕТЫ========================================================

View File

@@ -392,7 +392,7 @@ void dhtC_reading() {
if (dht.getStatus() != 0) {
sendSTATUS("dhtComfort", String(dht.getStatusString()));
} else {
float value = dht.getComfortRatio(cf, jsonReadStr(configLiveJson, dhtT_value_name).toFloat(), jsonReadStr(configLiveJson, dhtH_value_name).toFloat(), false);
dht.getComfortRatio(cf, jsonReadStr(configLiveJson, dhtT_value_name).toFloat(), jsonReadStr(configLiveJson, dhtH_value_name).toFloat(), false);
String final_line = get_comfort_status(cf);
jsonWriteStr(configLiveJson, "dhtComfort", final_line);
eventGen("dhtComfort", "");
@@ -486,7 +486,7 @@ void bmp280T() {
void bmp280T_reading() {
float value = 0;
sensors_event_t temp_event, pressure_event;
sensors_event_t temp_event;
bmp_temp->getEvent(&temp_event);
value = temp_event.temperature;
jsonWriteStr(configLiveJson, bmp280T_value_name, String(value));
@@ -517,7 +517,7 @@ void bmp280P() {
void bmp280P_reading() {
float value = 0;
sensors_event_t temp_event, pressure_event;
sensors_event_t pressure_event;
bmp_pressure->getEvent(&pressure_event);
value = pressure_event.pressure;
value = value / 1.333224;