@@ -741,7 +741,7 @@ int IridiumSBD::internalSendReceiveSBD(const char *txTxtMessage, const uint8_t *
741
741
diagprint (moCode);
742
742
diagprint (F (" \r\n " ));
743
743
744
- if (moCode >= 0 && moCode <= 4 ) // this range indicates successful return!
744
+ if (moCode <= 4 ) // this range indicates successful return!
745
745
{
746
746
diagprint (F (" SBDIX success!\r\n " ));
747
747
@@ -1393,7 +1393,7 @@ void IridiumSBD::check9603data()
1393
1393
wireport->beginTransmission ((uint8_t )deviceaddress); // Talk to the I2C device
1394
1394
wireport->write (LEN_REG); // Point to the serial buffer length
1395
1395
wireport->endTransmission (); // Send data and release the bus (the 841 (WireS) doesn't like it if the Master holds the bus!)
1396
- if (wireport->requestFrom ((uint8_t )deviceaddress, 2 ) == 2 ) // Request two bytes
1396
+ if (wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) 2 ) == 2 ) // Request two bytes
1397
1397
{
1398
1398
uint8_t msb = wireport->read ();
1399
1399
uint8_t lsb = wireport->read ();
@@ -1411,14 +1411,14 @@ void IridiumSBD::check9603data()
1411
1411
wireport->endTransmission (); // Send data and release the bus (the 841 (WireS) doesn't like it if the Master holds the bus!)
1412
1412
while (bytesAvailable > SER_PACKET_SIZE) // If there are _more_ than SER_PACKET_SIZE bytes to be read
1413
1413
{
1414
- wireport->requestFrom ((uint8_t )deviceaddress, SER_PACKET_SIZE, false ); // Request SER_PACKET_SIZE bytes, don't release the bus
1414
+ wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) SER_PACKET_SIZE, ( uint8_t ) false ); // Request SER_PACKET_SIZE bytes, don't release the bus
1415
1415
while (wireport->available ())
1416
1416
{
1417
1417
i2cSerPoke (wireport->read ()); // Read and store each byte
1418
1418
}
1419
1419
bytesAvailable -= SER_PACKET_SIZE; // Decrease the number of bytes available by SER_PACKET_SIZE
1420
1420
}
1421
- wireport->requestFrom ((uint8_t )deviceaddress, bytesAvailable); // Request remaining bytes, release the bus
1421
+ wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) bytesAvailable); // Request remaining bytes, release the bus
1422
1422
while (wireport->available ())
1423
1423
{
1424
1424
i2cSerPoke (wireport->read ()); // Read and store each byte
@@ -1436,7 +1436,7 @@ void IridiumSBD::check9603pins()
1436
1436
wireport->beginTransmission ((uint8_t )deviceaddress); // Talk to the I2C device
1437
1437
wireport->write (IO_REG); // Point to the 'IO register'
1438
1438
wireport->endTransmission (); // Send data and release the bus (the 841 (WireS) doesn't like it if the Master holds the bus!)
1439
- if (wireport->requestFrom ((uint8_t )deviceaddress, 1 ) == 1 ) // Request one byte from the IO register
1439
+ if (wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) 1 ) == 1 ) // Request one byte from the IO register
1440
1440
{
1441
1441
IO_REGISTER = wireport->read (); // Read the IO register
1442
1442
}
@@ -1466,7 +1466,7 @@ int IridiumSBD::internalPassThruI2Cread(uint8_t *rxBuffer, size_t &rxBufferSize,
1466
1466
wireport->beginTransmission ((uint8_t )deviceaddress); // Talk to the I2C device
1467
1467
wireport->write (LEN_REG); // Point to the serial buffer length
1468
1468
wireport->endTransmission (); // Send data and release the bus (the 841 (WireS) doesn't like it if the Master holds the bus!)
1469
- if (wireport->requestFrom ((uint8_t )deviceaddress, 2 ) == 2 ) // Request two bytes
1469
+ if (wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) 2 ) == 2 ) // Request two bytes
1470
1470
{
1471
1471
uint8_t msb = wireport->read ();
1472
1472
uint8_t lsb = wireport->read ();
@@ -1488,7 +1488,7 @@ int IridiumSBD::internalPassThruI2Cread(uint8_t *rxBuffer, size_t &rxBufferSize,
1488
1488
wireport->endTransmission (); // Send data and release the bus (the 841 (WireS) doesn't like it if the Master holds the bus!)
1489
1489
while (bytesAvailable > SER_PACKET_SIZE) // If there are _more_ than SER_PACKET_SIZE bytes to be read
1490
1490
{
1491
- wireport->requestFrom ((uint8_t )deviceaddress, SER_PACKET_SIZE, false ); // Request SER_PACKET_SIZE bytes, don't release the bus
1491
+ wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) SER_PACKET_SIZE, ( uint8_t ) false ); // Request SER_PACKET_SIZE bytes, don't release the bus
1492
1492
while (wireport->available ())
1493
1493
{
1494
1494
uint8_t dbyte = wireport->read (); // Read a byte
@@ -1500,7 +1500,7 @@ int IridiumSBD::internalPassThruI2Cread(uint8_t *rxBuffer, size_t &rxBufferSize,
1500
1500
}
1501
1501
bytesAvailable -= SER_PACKET_SIZE; // Decrease the number of bytes available by SER_PACKET_SIZE
1502
1502
}
1503
- wireport->requestFrom ((uint8_t )deviceaddress, bytesAvailable); // Request remaining bytes, release the bus
1503
+ wireport->requestFrom ((uint8_t )deviceaddress, ( uint8_t ) bytesAvailable); // Request remaining bytes, release the bus
1504
1504
while (wireport->available ())
1505
1505
{
1506
1506
uint8_t dbyte = wireport->read (); // Read a byte
0 commit comments