quick bugfix in SendWXFrame

pull/2/head
Mateusz Lubecki 2020-03-03 22:25:09 +01:00
rodzic 0ed71fceed
commit 11c5e0ddcb
3 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -4,7 +4,7 @@
#include "aprs/ax25.h"
#define SW_VER "DE07"
#define SW_DATE "23022020"
#define SW_DATE "03032020"
#define SYSTICK_TICKS_PER_SECONDS 100
#define SYSTICK_TICKS_PERIOD 10

Wyświetl plik

@ -23,8 +23,8 @@ void SendWXFrame(uint16_t windspeed, uint16_t windgusts, uint16_t winddirection,
uint16_t direction = winddirection;
// windspeed is stored as an increment of 0.1 meters per second in 16bit unsigned integer
temp = (float) (windspeed * 10.0f);
max_wind_speed = (float) (windgusts * 10.0f);
temp = ((float)windspeed / 10.0f);
max_wind_speed = ((float)windgusts / 10.0f);
temp /= 0.45; // Konwersja na mile na godzine
max_wind_speed /= 0.45;

Wyświetl plik

@ -198,9 +198,9 @@ void tx20_data_parse(void) {
}
uint16_t tx20_get_scaled_windspeed(void) {
float out = tx20_current_windspeed;
float out = tx20_current_windspeed * 10.0f;
return (uint16_t) (out * 10);
return (uint16_t) (out);
}
uint16_t tx20_get_wind_direction(void) {