Compilation fix
This commit is contained in:
@@ -793,32 +793,6 @@ void putsModelName(coord_t x, coord_t y, char *name, uint8_t id, LcdFlags att)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawPower(coord_t x, coord_t y, int8_t dBm, LcdFlags att)
|
|
||||||
{
|
|
||||||
float power_W_PREC1 = pow(10.0, (dBm - 30.0) / 10.0) * 10;
|
|
||||||
if (dBm >= 30) {
|
|
||||||
lcdDrawNumber(x, y, power_W_PREC1, PREC1 | att);
|
|
||||||
lcdDrawText(lcdNextPos, y, "W", att);
|
|
||||||
}
|
|
||||||
else if (dBm < 10) {
|
|
||||||
uint16_t power_MW_PREC1 = round(power_W_PREC1 * 1000);
|
|
||||||
lcdDrawNumber(x, y, power_MW_PREC1, PREC1 | att);
|
|
||||||
lcdDrawText(lcdNextPos, y, "mW", att);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
uint16_t power_MW = round(power_W_PREC1 * 100);
|
|
||||||
if (power_MW >= 50) {
|
|
||||||
power_MW = (power_MW / 5) * 5;
|
|
||||||
lcdDrawNumber(x, y, power_MW, att);
|
|
||||||
lcdDrawText(lcdNextPos, y, "mW", att);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lcdDrawNumber(x, y, power_MW, att);
|
|
||||||
lcdDrawText(lcdNextPos, y, "mW", att);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void drawSwitch(coord_t x, coord_t y, swsrc_t idx, LcdFlags flags)
|
void drawSwitch(coord_t x, coord_t y, swsrc_t idx, LcdFlags flags)
|
||||||
{
|
{
|
||||||
char s[8];
|
char s[8];
|
||||||
|
|||||||
@@ -233,6 +233,8 @@ swsrc_t editSwitch(coord_t x, coord_t y, swsrc_t value, LcdFlags attr, event_t e
|
|||||||
#define displayGVar(x, y, v, min, max) lcdDrawNumber(x, y, v)
|
#define displayGVar(x, y, v, min, max) lcdDrawNumber(x, y, v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void drawPower(coord_t x, coord_t y, int8_t dBm, LcdFlags att);
|
||||||
|
|
||||||
void gvarWeightItem(coord_t x, coord_t y, MixData * md, LcdFlags attr, event_t event);
|
void gvarWeightItem(coord_t x, coord_t y, MixData * md, LcdFlags attr, event_t event);
|
||||||
|
|
||||||
extern uint8_t s_curveChan;
|
extern uint8_t s_curveChan;
|
||||||
|
|||||||
@@ -188,3 +188,29 @@ void drawGVarName(coord_t x, coord_t y, int8_t idx, LcdFlags flags)
|
|||||||
getGVarString(s, idx);
|
getGVarString(s, idx);
|
||||||
lcdDrawText(x, y, s, flags);
|
lcdDrawText(x, y, s, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void drawPower(coord_t x, coord_t y, int8_t dBm, LcdFlags att)
|
||||||
|
{
|
||||||
|
float power_W_PREC1 = pow(10.0, (dBm - 30.0) / 10.0) * 10;
|
||||||
|
if (dBm >= 30) {
|
||||||
|
lcdDrawNumber(x, y, power_W_PREC1, PREC1 | att);
|
||||||
|
lcdDrawText(lcdNextPos, y, "W", att);
|
||||||
|
}
|
||||||
|
else if (dBm < 10) {
|
||||||
|
uint16_t power_MW_PREC1 = round(power_W_PREC1 * 1000);
|
||||||
|
lcdDrawNumber(x, y, power_MW_PREC1, PREC1 | att);
|
||||||
|
lcdDrawText(lcdNextPos, y, "mW", att);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uint16_t power_MW = round(power_W_PREC1 * 100);
|
||||||
|
if (power_MW >= 50) {
|
||||||
|
power_MW = (power_MW / 5) * 5;
|
||||||
|
lcdDrawNumber(x, y, power_MW, att);
|
||||||
|
lcdDrawText(lcdNextPos, y, "mW", att);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lcdDrawNumber(x, y, power_MW, att);
|
||||||
|
lcdDrawText(lcdNextPos, y, "mW", att);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user