uart now optional, macos openal fix

This commit is contained in:
milek
2019-03-25 19:53:44 +00:00
parent aaf67caae2
commit c09160d8f5
6 changed files with 35 additions and 12 deletions

View File

@@ -45,9 +45,11 @@ driver_mode::drivermode_input::poll() {
if( true == Global.InputGamepad ) {
gamepad.poll();
}
#ifdef WITH_UART
if( uart != nullptr ) {
uart->poll();
}
#endif
/*
// TBD, TODO: wrap current command in object, include other input sources?
input::command = (
@@ -67,10 +69,12 @@ driver_mode::drivermode_input::init() {
if( true == Global.InputGamepad ) {
gamepad.init();
}
#ifdef WITH_UART
if( true == Global.uart_conf.enable ) {
uart = std::make_unique<uart_input>();
uart->init();
}
#endif
if (Global.motiontelemetry_conf.enable)
telemetry = std::make_unique<motiontelemetry>();