Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Commit dc10f5f

Browse files
committed
Antennaheight works now
1 parent ee9f42f commit dc10f5f

21 files changed

Lines changed: 179 additions & 170 deletions

File tree

TODO.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
### TODO.md
22

33

4+
Gui changes to do:
5+
6+
- doppler on kills image
7+
- antenna height is NaN NM?
8+
- fix padding/border in read only values
9+
- check why hours are rounded to a half hour
10+
- fix double enable checkboxes in NoTransmitSector
11+
12+
413
A list of things still to do before this code has caught back up with Dirk's vibe coded version:
514

615
1. Check and finagle the Furuno code back into operation. It should work, but hasn't been tested.

src/bin/mayara-server/web/signalk/v2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ async fn control_stream_handler(
473473
Query(params): Query<SignalKWebSocket>,
474474
ws: WebSocketUpgrade,
475475
) -> Response {
476-
log::info!(
476+
log::debug!(
477477
"stream request for \"/signalk/v2/api/vessels/self/radars/stream\" from {} params={:?}",
478478
addr,
479479
params
@@ -556,7 +556,7 @@ async fn ws_signalk_delta(
556556
let (reply_tx, mut reply_rx) = tokio::sync::mpsc::channel::<ControlValue>(ControlId::COUNT);
557557
let mut meta_radar_data_sent = Vec::new();
558558

559-
log::info!(
559+
log::debug!(
560560
"Starting /signalk/v2/api/vessels/self/radars/stream websocket subscribe={:?} send_cached_values={:?}",
561561
subscribe,
562562
send_cached_values
@@ -813,7 +813,7 @@ async fn send_all_subscribed(
813813
if subscriptions.mode == Subscribe::Some {
814814
rcvs.retain(|x| subscriptions.is_subscribed(x, true));
815815
}
816-
log::info!("Sending {} subscribed controls", rcvs.len());
816+
log::debug!("Sending {} subscribed controls", rcvs.len());
817817
if rcvs.len() > 0 {
818818
let mut delta: SignalKDelta = SignalKDelta::new();
819819
delta.add_updates(rcvs);

src/lib/brand/furuno/report.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl FurunoReportReceiver {
130130
loop {
131131
tokio::select! {
132132
_ = subsys.on_shutdown_requested() => {
133-
log::info!("{}: shutdown", self.common.key);
133+
log::debug!("{}: shutdown", self.common.key);
134134
return Err(RadarError::Shutdown);
135135
},
136136

src/lib/brand/furuno/settings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use std::collections::HashMap;
33
use crate::{
44
Cli,
55
radar::settings::{
6-
ControlId, HAS_AUTO_NOT_ADJUSTABLE, SharedControls, Units, new_auto, new_list, new_numeric,
6+
ControlId, HAS_AUTO_NOT_ADJUSTABLE, SharedControls, new_auto, new_list, new_numeric,
77
new_sector, new_string,
88
},
9-
radar::{RadarInfo, range::Ranges},
9+
radar::{RadarInfo, range::Ranges, units::Units},
1010
stream::SignalKDelta,
1111
};
1212

src/lib/brand/navico/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ impl CommandSender for Command {
304304
cmd.extend_from_slice(&value.to_le_bytes());
305305
}
306306
ControlId::AntennaHeight => {
307-
let value = deci_value as u16;
307+
let value = (value * 1000.) as u16;
308308
cmd.extend_from_slice(&[0x30, 0xc1, 0x01, 0, 0, 0]);
309309
cmd.extend_from_slice(&value.to_le_bytes());
310310
cmd.extend_from_slice(&[0, 0]);

src/lib/brand/navico/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ impl NavicoLocator {
291291
Ok(data) => {
292292
log::debug!("{} sent NavicoBeaconDual {:?}", from, data);
293293
if let Some(serial_no) = c_string(&data.header.serial_no) {
294-
log::info!(
294+
log::debug!(
295295
"{} locating dual-range radar @ {}",
296296
from,
297297
data.header.radar_addr
@@ -358,7 +358,7 @@ impl NavicoLocator {
358358
Ok(data) => {
359359
log::debug!("{} sent NavicoBeaconSingle {:?}", from, data);
360360
if let Some(serial_no) = c_string(&data.header.serial_no) {
361-
log::info!(
361+
log::debug!(
362362
"{} locating single-range radar @ {}",
363363
from,
364364
data.header.radar_addr
@@ -404,7 +404,7 @@ impl NavicoLocator {
404404
log::debug!("{} sent BR24Beacon {:?}", from, data);
405405

406406
if let Some(serial_no) = c_string(&data.serial_no) {
407-
log::info!("{} locating BR24 @ {}", from, data.radar_addr);
407+
log::debug!("{} locating BR24 @ {}", from, data.radar_addr);
408408
let radar_addr: SocketAddrV4 = from.clone();
409409

410410
let radar_data: SocketAddrV4 = data.data.into();

src/lib/brand/navico/report.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ impl NavicoReportReceiver {
11481148
}
11491149
_ => {
11501150
if self.model != model {
1151-
log::info!("{}: Radar is model {}", self.common.key, model);
1151+
log::debug!("{}: Radar is model {}", self.common.key, model);
11521152
let info2 = self.common.info.clone();
11531153
self.model = model;
11541154
super::settings::update_when_model_known(
@@ -1242,7 +1242,7 @@ impl NavicoReportReceiver {
12421242
let start_angle = i16::from_le_bytes(blanking.start_angle);
12431243
let end_angle = i16::from_le_bytes(blanking.end_angle);
12441244
let enabled = Some(blanking.enabled > 0);
1245-
log::info!(
1245+
log::debug!(
12461246
"no_transmit_sector_{}: {}-{} en={:?}",
12471247
i,
12481248
start_angle,
@@ -1284,7 +1284,7 @@ impl NavicoReportReceiver {
12841284
};
12851285

12861286
if self.model != model {
1287-
log::info!("{}: Radar is model {}", self.common.key, model);
1287+
log::debug!("{}: Radar is model {}", self.common.key, model);
12881288
let info2 = self.common.info.clone();
12891289
self.model = model;
12901290
super::settings::update_when_model_known(&mut self.common.info.controls, model, &info2);

src/lib/brand/navico/settings.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use crate::{
77
Cli,
88
radar::RadarInfo,
99
radar::settings::{
10-
AutomaticValue, ControlId, HAS_AUTO_NOT_ADJUSTABLE, SharedControls, Units, new_auto,
11-
new_list, new_numeric, new_sector, new_string,
10+
AutomaticValue, ControlId, HAS_AUTO_NOT_ADJUSTABLE, SharedControls, new_auto, new_list,
11+
new_numeric, new_sector, new_string,
1212
},
13+
radar::units::Units,
1314
stream::SignalKDelta,
1415
};
1516

@@ -29,7 +30,7 @@ pub fn new(
2930
.set_string(model.unwrap().to_string());
3031
}
3132

32-
new_numeric(ControlId::AntennaHeight, 0., 99.)
33+
new_numeric(ControlId::AntennaHeight, 0., 60.)
3334
.wire_scale_factor(1000., false)
3435
.wire_scale_step(0.1) // Allow control in decimeters
3536
.wire_units(Units::Meters)

src/lib/brand/raymarine/report.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub(super) fn pixel_to_blob(legend: &Legend) -> PixelToBlobType {
5656
};
5757
}
5858
}
59-
log::info!("Created pixel_to_blob from legend {:?}", legend);
59+
log::debug!("Created pixel_to_blob from legend {:?}", legend);
6060
lookup
6161
}
6262

@@ -157,7 +157,7 @@ impl RaymarineReportReceiver {
157157
let timeout = self.report_request_timeout;
158158
tokio::select! {
159159
_ = subsys.on_shutdown_requested() => {
160-
log::info!("{}: shutdown", self.common.key);
160+
log::debug!("{}: shutdown", self.common.key);
161161
return Err(RadarError::Shutdown);
162162
},
163163
_ = sleep_until(timeout) => {

src/lib/brand/raymarine/report/quantum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub(super) fn process_info_report(receiver: &mut RaymarineReportReceiver, data:
332332

333333
match RaymarineModel::try_into(&model_serial) {
334334
Some(model) => {
335-
log::info!(
335+
log::debug!(
336336
"{}: Detected model: {} with serial {}",
337337
receiver.common.key,
338338
model.name,

0 commit comments

Comments
 (0)