Fix some warnings 1
This commit is contained in:
@@ -190,8 +190,6 @@ bool _readFromClient(uint8_t i) {
|
||||
|
||||
bool gatewayTransportAvailable()
|
||||
{
|
||||
bool available = false;
|
||||
|
||||
#if !defined(MY_IP_ADDRESS) && defined(MY_GATEWAY_W5100)
|
||||
// renew IP address using DHCP
|
||||
gatewayTransportRenewIP();
|
||||
|
||||
@@ -81,7 +81,7 @@ inline void transportProcess() {
|
||||
uint8_t command = mGetCommand(_msg);
|
||||
uint8_t type = _msg.type;
|
||||
uint8_t sender = _msg.sender;
|
||||
uint8_t last = _msg.last;
|
||||
//uint8_t last = _msg.last;
|
||||
uint8_t destination = _msg.destination;
|
||||
|
||||
#ifdef MY_SIGNING_FEATURE
|
||||
@@ -116,7 +116,7 @@ inline void transportProcess() {
|
||||
// Add string termination, good if we later would want to print it.
|
||||
_msg.data[mGetLength(_msg)] = '\0';
|
||||
debug(PSTR("read: %d-%d-%d s=%d,c=%d,t=%d,pt=%d,l=%d,sg=%d:%s\n"),
|
||||
sender, last, destination, _msg.sensor, mGetCommand(_msg), type, mGetPayloadType(_msg), mGetLength(_msg), mGetSigned(_msg), _msg.getString(_convBuf));
|
||||
sender, _msg.last, destination, _msg.sensor, mGetCommand(_msg), type, mGetPayloadType(_msg), mGetLength(_msg), mGetSigned(_msg), _msg.getString(_convBuf));
|
||||
mSetSigned(_msg,0); // Clear the sign-flag now as verification (and debug printing) is completed
|
||||
|
||||
if(!(mGetVersion(_msg) == PROTOCOL_VERSION)) {
|
||||
@@ -129,9 +129,9 @@ inline void transportProcess() {
|
||||
// This message is addressed to this node
|
||||
|
||||
#if defined(MY_REPEATER_FEATURE)
|
||||
if (last != _nc.parentNodeId) {
|
||||
if (_msg.last != _nc.parentNodeId) {
|
||||
// Message is from one of the child nodes. Add it to routing table.
|
||||
hwWriteConfig(EEPROM_ROUTES_ADDRESS+sender, last);
|
||||
hwWriteConfig(EEPROM_ROUTES_ADDRESS+sender, _msg.last);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -388,7 +388,6 @@ boolean transportSendRoute(MyMessage &message) {
|
||||
(type != I_GET_NONCE && type != I_GET_NONCE_RESPONSE && type != I_REQUEST_SIGNING &&
|
||||
type != I_ID_REQUEST && type != I_ID_RESPONSE &&
|
||||
type != I_FIND_PARENT && type != I_FIND_PARENT_RESPONSE))) {
|
||||
bool signing = SIGN_WAITING_FOR_NONCE;
|
||||
// Send nonce-request
|
||||
if (!_sendRoute(build(_msgTmp, _nc.nodeId, message.destination, message.sensor, C_INTERNAL, I_GET_NONCE, false).set(""))) {
|
||||
debug(PSTR("nonce tr err\n"));
|
||||
|
||||
@@ -70,10 +70,11 @@ void loop()
|
||||
// Sense point is bypassed with 0.1 uF cap to reduce noise at that point
|
||||
// ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts
|
||||
// 3.44/1023 = Volts per bit = 0.003363075
|
||||
float batteryV = sensorValue * 0.003363075;
|
||||
|
||||
int batteryPcnt = sensorValue / 10;
|
||||
|
||||
#ifdef DEBUG
|
||||
float batteryV = sensorValue * 0.003363075;
|
||||
Serial.print("Battery Voltage: ");
|
||||
Serial.print(batteryV);
|
||||
Serial.println(" V");
|
||||
|
||||
Reference in New Issue
Block a user