RangingSensor and bug fixed

Implemented RangingSensor driver and choice between barometer and RangingSensor. Reduced I/O load.
This commit is contained in:
2024-03-11 22:47:32 +07:00
parent 007a3fd16f
commit e27b3ca794
16 changed files with 208 additions and 73 deletions

View File

@@ -167,8 +167,8 @@ void FlightDispatcher::_pidSettingsOpened() {
pkg.endObj();
pkg.end();
pkg.s = String(MessageType::PidSettings) + ";" + pkg.s + _message_delimeter;
_bluetoothDispatcher->sendPackage(pkg.s.c_str(), strlen(pkg.s.c_str()));
pkg.s = String(MessageType::PidSettings) + ";" + pkg.s;
_bluetoothDispatcher->sendPackage(pkg.s.c_str());
ESP_LOGI(_tag, "PID settings sended %s", pkg.s.c_str());
}
@@ -186,6 +186,6 @@ void FlightDispatcher::_sendTelemetry() {
package["zIn"] = state.mpuState.zInertial;
package.endObj();
package.end();
package.s = String(MessageType::UpdatePackage) + ";" + package.s + _message_delimeter;
_bluetoothDispatcher->sendPackage(package.s.c_str(), strlen((package.s.c_str())));
package.s = String(MessageType::UpdatePackage) + ";" + package.s;
_bluetoothDispatcher->sendPackage(package.s.c_str());
}