diff --git a/firmware/src/main.rs b/firmware/src/main.rs index fb16b63..57f7c93 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -127,50 +127,6 @@ fn main() -> ! { // TODO first connection to a socket takes a while to establish, and can time out, why? cmd.run(socket_set.get_mut(command_socket)); - - //if iface.poll(Instant::from_millis(now), &mut device, &mut socket_set) { - - //let sock = socket_set.get_mut::(command_socket); - - //if !sock.is_open() { - // sock.listen(2000); - //} - - //let mut echo_tx_buf = [0u8; 32]; - //match sock.recv(|buf| { - // if buf.len() > 0 { - // // Copy into send buffer - // let rd_len = core::cmp::min(buf.len(), echo_tx_buf.len()); - // &echo_tx_buf[..rd_len].copy_from_slice(&buf[..rd_len]); - // defmt::trace!("RX data command"); - - // // Return slice to send - // (rd_len, Some(&echo_tx_buf[..rd_len])) - // } else { - // (0, None) - // } - //}) { - // Err(_) => { - // // Close the socket, re-open it later - // //sock.abort(); - // // Is doing this immediately legal? - // //sock.listen(2000); - // } - // // Some data to send - // Ok(Some(tx_data)) => { - // match sock.send_slice(tx_data) { - // Err(_) => { - // //sock.abort(); - // //sock.listen(2000); - // } - // _ => (), - // } - // } - // // No data to send - // Ok(None) => (), - //} - - //} } }