Ignore packets of 0 bytes size
This commit is contained in:
parent
f488786e1c
commit
4526536a48
|
@ -136,9 +136,11 @@ fn main() -> ! {
|
|||
net::net::clear_pending(cs);
|
||||
});
|
||||
let bytes = net::net::eth_recv(&mut ETH_DATA_BUFFER);
|
||||
info!("Ts: {:?}", sys_timer::now());
|
||||
debug!("Number of bytes recv: {:?}", bytes);
|
||||
(laser, thermostat, should_reset, device_settings) = net::cmd_handler::execute_cmd(&mut ETH_DATA_BUFFER, bytes, laser, thermostat, device_settings);
|
||||
if bytes != 0 {
|
||||
info!("Ts: {:?}", sys_timer::now());
|
||||
debug!("Number of bytes recv: {:?}", bytes);
|
||||
(laser, thermostat, should_reset, device_settings) = net::cmd_handler::execute_cmd(&mut ETH_DATA_BUFFER, bytes, laser, thermostat, device_settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
if has_temp_reading {
|
||||
|
|
Loading…
Reference in New Issue