Skip to content

Commit

Permalink
try something
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxzer committed Jan 24, 2024
1 parent d51eeea commit 66b0d9e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/sensor/ping360.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,33 +431,10 @@ void Ping360::handleMessage(const ping_message& msg)
emit angleChanged();

// Only emit data changed when inside sector range
if (_data.size()) {
// Update total number of pings
_ping_number++;

emit dataChanged();
}

// This properties are changed internally only when the link is not writable
// Such information is normally sync between our application and the sensor
// So with normal links such attribution is not necessary
_sensorSettings.checkSector = true;
_sensorSettings.checkValidation({autoDeviceData.transmit_duration(), autoDeviceData.gain_setting(),
autoDeviceData.data_length(), autoDeviceData.sample_period(), autoDeviceData.transmit_frequency(),
autoDeviceData.start_angle(), autoDeviceData.stop_angle()});

// Everything should be valid, otherwise the sensor is not in sync
if (!link()->isWritable() && _sensorSettings.valid) {
set_gain_setting(autoDeviceData.gain_setting());
set_transmit_duration(autoDeviceData.transmit_duration());
set_sample_period(autoDeviceData.sample_period());
set_transmit_frequency(autoDeviceData.transmit_frequency());
set_number_of_points(autoDeviceData.data_length());
}

if (!_sensorSettings.valid) {
requestNextProfile();
}

break;
}
Expand Down

0 comments on commit 66b0d9e

Please sign in to comment.