Closed brice-morin closed 9 years ago
Here is a simple fix: (read the double as a long with a pointer to enable bit to bit operations)
long * myLong = (long *) &t;
// ID of the source instance _fifo_enqueue( (_instance->id >> 8) & 0xFF ); _fifo_enqueue( _instance->id & 0xFF );
// parameter t read with myLong _fifo_enqueue((_myLong>>24) & 0xFF); _fifo_enqueue((_myLong>>16) & 0xFF); _fifo_enqueue((_myLong>>8) & 0xFF); _fifo_enqueue(_myLong & 0xFF);
It seems Double is not support by the Arduino compiler.
The following ThingML code: message report_rotation(t : Double)//report the angle in radians
Compiles to the following Arduino code: // Enqueue of messages SensorsDisplay::RemoteControl::report_rotation void enqueue_SensorsDisplay_send_RemoteControl_report_rotation(struct SensorsDisplay_Instance *_instance, double t){ if ( fifo_byte_available() > 8 ) {
} }