mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 05:42:49 +08:00
[abi] allow to pass variables by value
before the generated ABI callbacks always had a signature with `const type *var` where type was e.g float. Now the generated signature is simply `type var`. To pass const pointers again, set it accordingly in abi.xml, e.g. type="const float *" instead of type="float"
This commit is contained in:
@@ -550,7 +550,7 @@ void navdata_update()
|
||||
// Check if there is a new sonar measurement and update the sonar
|
||||
if (navdata.ultrasound >> 15) {
|
||||
float sonar_meas = (float)((navdata.ultrasound & 0x7FFF) - SONAR_OFFSET) * SONAR_SCALE;
|
||||
AbiSendMsgAGL(AGL_SONAR_ARDRONE2_ID, &sonar_meas);
|
||||
AbiSendMsgAGL(AGL_SONAR_ARDRONE2_ID, sonar_meas);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user