diff --git a/libraries/Desktop/support/sitl_adc.h b/libraries/Desktop/support/sitl_adc.h index 38a3caba44..a467a20b7f 100644 --- a/libraries/Desktop/support/sitl_adc.h +++ b/libraries/Desktop/support/sitl_adc.h @@ -8,6 +8,15 @@ #include +#define NOISE_BITS 4 + +static inline float noise_generator(void) +{ + float noise = ((unsigned)random()) & ((1<= 0x1000) { next_value = 0xFFF; }