Skip to content

Commit

Permalink
Revert "try something"
Browse files Browse the repository at this point in the history
This reverts commit 66b0d9e.
  • Loading branch information
jaxxzer committed Jan 25, 2024
1 parent e304fd4 commit d94d4dd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/sensor/ping360.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,33 @@ 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 d94d4dd

Please sign in to comment.