AP_Scripting: don't include CAN support on periph if there is only one CAN port

This commit is contained in:
Iampete1
2023-10-04 17:27:54 +01:00
committed by Andrew Tridgell
parent 75ac3f98fa
commit fc68bf8979
5 changed files with 21 additions and 11 deletions

View File

@@ -630,7 +630,7 @@ int AP_HAL__I2CDevice_read_registers(lua_State *L) {
return success;
}
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
#if AP_SCRIPTING_CAN_SENSOR_ENABLED
int lua_get_CAN_device(lua_State *L) {
// Allow : and . access
@@ -680,7 +680,7 @@ int lua_get_CAN_device2(lua_State *L) {
return 1;
}
#endif // HAL_MAX_CAN_PROTOCOL_DRIVERS
#endif // AP_SCRIPTING_CAN_SENSOR_ENABLED
/*
directory listing, return table of files in a directory