Compare commits
2 Commits
f92b2ba6f5
...
0816220065
Author | SHA1 | Date |
---|---|---|
occheung | 0816220065 | |
occheung | c39aa289d5 |
|
@ -15,8 +15,10 @@ stm32h7xx-hal = {version = "0.6.0", features = [ "stm32h743v", "rt", "unproven"
|
|||
stm32h7-ethernet = { version = "0.2.0", features = [ "phy_lan8742a", "stm32h743v" ] }
|
||||
smoltcp = { version = "0.6.0", default-features = false, features = [ "ethernet", "proto-ipv4", "proto-ipv6", "socket-raw" ] }
|
||||
nb = "1.0.0"
|
||||
scpi = {path = "../scpi-rs/scpi", version = "0.3.4"}
|
||||
# scpi = {path = "../scpi-rs/scpi", version = "0.3.4"}
|
||||
scpi = { git = "https://github.com/occheung/scpi-rs", branch = "issue-4" }
|
||||
lexical-core = { version="0.7.1", features=["radix"], default-features=false }
|
||||
libm = { version = "0.2.0" }
|
||||
|
||||
# Logging and Panicking
|
||||
panic-itm = "0.4.1"
|
||||
|
|
|
@ -29,6 +29,8 @@ use stm32h7xx_hal::rcc::CoreClocks;
|
|||
use stm32h7xx_hal::{pac, prelude::*, stm32, stm32::interrupt};
|
||||
use Speed::*;
|
||||
|
||||
use libm::round;
|
||||
|
||||
/*
|
||||
#[cfg(feature = "itm")]
|
||||
use cortex_m_log::log::{trick_init, Logger};
|
||||
|
@ -271,8 +273,8 @@ fn main() -> ! {
|
|||
(buffer.len(), buffer)
|
||||
}).unwrap();
|
||||
hprintln!("{:?}", data).unwrap();
|
||||
let result = lexical_core::parse_partial::<f32>(data).unwrap();
|
||||
writeln!(socket, "{}", (result.0 * 2.0));
|
||||
let result = lexical_core::parse_partial::<f64>(data).unwrap();
|
||||
writeln!(socket, "{}", round(result.0 * 2.0));
|
||||
}
|
||||
else if socket.can_recv() {
|
||||
// hprintln!("{:?}", socket.can_recv());
|
||||
|
|
Loading…
Reference in New Issue