Changed "float" to "double"

type fix due to new refactoring in Spectrum App
This commit is contained in:
r3df0xx
2022-05-11 14:48:31 +03:00
parent 65835c6223
commit b34018bf1b
3 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ typedef struct {
uint32_t channel0_frequency;
uint32_t spacing;
float max_rssi;
double max_rssi;
uint8_t max_rssi_dec;
uint8_t max_rssi_channel;
uint8_t channel_ss[NUM_CHANNELS];
@@ -135,7 +135,7 @@ static void spectrum_analyzer_render_callback(Canvas* const canvas, void* ctx) {
temp_str,
36,
"Peak: %3.2f Mhz %3.1f dbm",
((float)(model->channel0_frequency + (model->max_rssi_channel * model->spacing)) /
((double)(model->channel0_frequency + (model->max_rssi_channel * model->spacing)) /
1000000),
model->max_rssi);
canvas_draw_str_aligned(canvas, 127, 0, AlignRight, AlignTop, temp_str);
@@ -156,7 +156,7 @@ static void spectrum_analyzer_input_callback(InputEvent* input_event, void* ctx)
static void spectrum_analyzer_worker_callback(
void* channel_ss,
float max_rssi,
double max_rssi,
uint8_t max_rssi_dec,
uint8_t max_rssi_channel,
void* context) {