-
Notifications
You must be signed in to change notification settings - Fork 0
Vinscant rust #69
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
Vinscant rust #69
Conversation
wifi works http request works
TODO make student card works
basically tuning it
hannes-dev
left a comment
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.
Nice! Most of your code seems really good and you show a good understanding of most Rust syntax, but some slight tweaks can be made!
Co-authored-by: Hannes <hannes-dev@mailbox.org>
vinscant: code cleanup
hannes-dev
left a comment
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.
Looks really nice overall :)
| leds: 8, | ||
| idle_effect: Box::new(PingPong::new(8, vec![Srgb::new(0xff, 0x7f, 0x00)])), | ||
| buzzer, | ||
| mqtt_client: EspMqttClient::new("mqtt://192.168.0.12:1883", &MqttClientConfiguration{ |
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.
Probably not a big deal, but would it be better for this to be a XXX.kelder.local instead?
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.
Dns does not work correctly for some reason
| if let Ok(answer) = scanner.reqa() { | ||
| if let Ok(uid) = scanner.select(&answer) { | ||
| if uid.as_bytes() == last_uid.as_bytes() && get_time() - last_time <= 15 { |
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.
| if let Ok(answer) = scanner.reqa() { | |
| if let Ok(uid) = scanner.select(&answer) { | |
| if uid.as_bytes() == last_uid.as_bytes() && get_time() - last_time <= 15 { | |
| if let Ok(answer) = scanner.reqa() | |
| && let Ok(uid) = scanner.select(&answer) | |
| && uid.as_bytes() == last_uid.as_bytes() && get_time() - last_time <= 15 { |
also definitely not necessary, but if you want you could update to rust 1.88 and edition 2024 and use if let chains :D
TODO: