Skip to content

Commit d55928a

Browse files
committed
(gui): choose schema during compile time, for simplicity
1 parent 6093e52 commit d55928a

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

gui/src/backend/udp.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,17 @@ impl BackendVariant for UdpBackend {
224224
self.fc_settings = Some(settings);
225225
}
226226
DownlinkMessage::Telemetry(time, message) if message.len() != 0 => {
227-
if interpret_buffer_with_schema(&LORA_SCHEMA, message.as_slice(), time).is_ok() {
228-
self.data_store.ingest_message(&LORA_SCHEMA, time, message);
227+
// if interpret_buffer_with_schema(&LORA_SCHEMA, message.as_slice(), time).is_ok() {
228+
// self.data_store.ingest_message(&LORA_SCHEMA, time, message);
229229
// } else if interpret_buffer_with_schema(&USB_SCHEMA, message.as_slice(), time).is_ok() {
230230
// self.data_store.ingest_message(&USB_SCHEMA, time, message);
231-
} else {
232-
error!("Could not identify DownlinkMessage as LORA_SCHEMA nor as USB_SCHEMA, ignoring");
233-
}
231+
// } else {
232+
// error!("Could not identify DownlinkMessage as LORA_SCHEMA nor as USB_SCHEMA, ignoring");
233+
// }
234+
235+
// FIXME: choose one on the following lines before compiling
236+
self.data_store.ingest_message(&LORA_SCHEMA, time, message);
237+
// self.data_store.ingest_message(&USB_SCHEMA, time, message);
234238
}
235239
_ => {
236240
// TODO: metrics via downlink message

0 commit comments

Comments
 (0)