-
Notifications
You must be signed in to change notification settings - Fork 3
Update the firware binary to work with latest cc3200-rs #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ping @dhylands |
} | ||
|
||
pub const SENSOR_READING_COUNT: u32 = 10; | ||
pub const SERVER_URL: &'static str = "http://10.252.33.211:8000/endpoint"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no newline at end of file
@@ -9,5 +9,6 @@ export PATH=/home/travis/.cargo/bin:$PATH | |||
rustup default nightly | |||
rustup component add rust-src | |||
cargo install xargo | |||
cp src/config.rs.sample src/config.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like a reasonable way to do it in cc3200-rs as well (and addresses your concern about checking the file in accidentally).
|
||
for _ in 0..config::SENSOR_READING_COUNT { | ||
let temperature: u32 = (temp_sensor.get_temperature().unwrap() * 10.0) as u32; | ||
info!("Feels like {}.{} C", temperature / 10, temperature % 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This will report interesting results with a negative temperature :)
info!("Received {}", | ||
response.body.read_string_to_end(&mut buffer).unwrap()); | ||
CurrentTask::delay(Duration::ms(1000)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where this actually sends a temperature to the server.
@dhylands I addressed comments and pinned Rustc to the same version as in cc3200-rs. That fixed the unrelated cargo issue which is rust-lang/cargo#3340 |
lgtm |
Changes in this PR are: