Skip to content

Commit cde2cce

Browse files
committed
no warnings
1 parent 41fa0d4 commit cde2cce

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

lib/Espfc/src/Connect/MspProcessor.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -1424,33 +1424,33 @@ void MspProcessor::processCommand(MspMessage& m, MspResponse& r, Device::SerialD
14241424
{
14251425
uint16_t freq = m.readU16();
14261426
if (freq <= VTXCOMMON_MSP_BANDCHAN_CHKVAL) { // Value is band and channel
1427-
const uint8_t newBand = (freq / 8) + 1;
1428-
const uint8_t newChannel = (freq % 8) + 1;
1427+
//const uint8_t newBand = (freq / 8) + 1;
1428+
//const uint8_t newChannel = (freq % 8) + 1;
14291429
}
14301430

14311431
if (m.remain() >= 2) {
14321432
_model.config.vtx.power = m.readU8();
1433-
const uint8_t newPitmode = m.readU8();
1433+
/*const uint8_t newPitmode = */m.readU8();
14341434
}
14351435

14361436
if (m.remain()) {
14371437
_model.config.vtx.lowPowerDisarm = m.readU8();
14381438
}
14391439

1440-
// API version 1.42 - this parameter kept separate since clients may already be supplying
1441-
if (m.remain() >= 2) {
1442-
const uint16_t pitModeFreq = m.readU16();
1443-
}
1440+
// API version 1.42 - this parameter kept separate since clients may already be supplying
1441+
if (m.remain() >= 2) {
1442+
/*const uint16_t pitModeFreq = */m.readU16();
1443+
}
14441444

1445-
// API version 1.42 - extensions for non-encoded versions of the band, channel or frequency
1446-
if (m.remain() >= 4) {
1445+
// API version 1.42 - extensions for non-encoded versions of the band, channel or frequency
1446+
if (m.remain() >= 4) {
14471447
// Added standalone values for band, channel and frequency to move
14481448
// away from the flawed encoded combined method originally implemented.
14491449
_model.config.vtx.band = m.readU8();
14501450
_model.config.vtx.channel = m.readU8();
1451-
uint16_t newFreq = m.readU16();
1451+
/*uint16_t newFreq = */m.readU16();
1452+
}
14521453
}
1453-
}
14541454
break;
14551455

14561456

lib/Espfc/src/Connect/Vtx.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ int Vtx::update()
7171
_state = State::SET_POWER;
7272
}
7373
break;
74+
case State::INACTIVE:
75+
default:
76+
break;
7477
}
7578

7679
return 1;
@@ -89,7 +92,7 @@ int Vtx::setChannel()
8992

9093
int Vtx::setPower()
9194
{
92-
uint8_t vtxCommand[6] = { 0xAA, 0x55, 0x05, 0x01, !_model.config.vtx.lowPowerDisarm || _model.isModeActive(MODE_ARMED) ? _model.config.vtx.power - 1 : 0 };
95+
uint8_t vtxCommand[6] = { 0xAA, 0x55, 0x05, 0x01, (uint8_t)((!_model.config.vtx.lowPowerDisarm || _model.isModeActive(MODE_ARMED)) ? _model.config.vtx.power - 1 : 0) };
9396
vtxCommand[5] = crc8(vtxCommand, 5);
9497
_serial->write(dummyByte, 1);
9598
_serial->write(vtxCommand, 6);

0 commit comments

Comments
 (0)