mirror of https://github.com/arendst/Tasmota.git
More floats
This commit is contained in:
parent
b0eaea45bc
commit
5b524a2c95
|
@ -128,8 +128,8 @@ void DuskTillDawn(uint8_t *hour_up,uint8_t *minute_up, uint8_t *hour_down, uint8
|
||||||
*/
|
*/
|
||||||
// double h = -50/60.0*RAD;
|
// double h = -50/60.0*RAD;
|
||||||
float h = SUNRISE_DAWN_ANGLE *RAD;
|
float h = SUNRISE_DAWN_ANGLE *RAD;
|
||||||
float B = (((double)Settings.latitude)/1000000) * RAD; // geographische Breite
|
float B = (((float)Settings.latitude)/1000000) * RAD; // geographische Breite
|
||||||
float GeographischeLaenge = ((double)Settings.longitude)/1000000;
|
float GeographischeLaenge = ((float)Settings.longitude)/1000000;
|
||||||
// double Zeitzone = 0; //Weltzeit
|
// double Zeitzone = 0; //Weltzeit
|
||||||
// double Zeitzone = 1; //Winterzeit
|
// double Zeitzone = 1; //Winterzeit
|
||||||
// double Zeitzone = 2.0; //Sommerzeit
|
// double Zeitzone = 2.0; //Sommerzeit
|
||||||
|
@ -490,7 +490,7 @@ bool TimerCommand(void)
|
||||||
Settings.longitude = (int)(CharToDouble(XdrvMailbox.data) *1000000);
|
Settings.longitude = (int)(CharToDouble(XdrvMailbox.data) *1000000);
|
||||||
}
|
}
|
||||||
char lbuff[33];
|
char lbuff[33];
|
||||||
dtostrfd(((double)Settings.longitude) /1000000, 6, lbuff);
|
dtostrfd(((float)Settings.longitude) /1000000, 6, lbuff);
|
||||||
Response_P(S_JSON_COMMAND_SVALUE, command, lbuff);
|
Response_P(S_JSON_COMMAND_SVALUE, command, lbuff);
|
||||||
}
|
}
|
||||||
else if (CMND_LATITUDE == command_code) {
|
else if (CMND_LATITUDE == command_code) {
|
||||||
|
@ -498,7 +498,7 @@ bool TimerCommand(void)
|
||||||
Settings.latitude = (int)(CharToDouble(XdrvMailbox.data) *1000000);
|
Settings.latitude = (int)(CharToDouble(XdrvMailbox.data) *1000000);
|
||||||
}
|
}
|
||||||
char lbuff[33];
|
char lbuff[33];
|
||||||
dtostrfd(((double)Settings.latitude) /1000000, 6, lbuff);
|
dtostrfd(((float)Settings.latitude) /1000000, 6, lbuff);
|
||||||
Response_P(S_JSON_COMMAND_SVALUE, command, lbuff);
|
Response_P(S_JSON_COMMAND_SVALUE, command, lbuff);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue