Microbug / MicroBitDAL_SB2_TEST

Fork of MicroBitDALImageRewrite by Joe Finney

Committer:
finneyj
Date:
Sat May 16 22:28:56 2015 +0000
Revision:
5:8bf639bbedb5
Parent:
4:f998ee705a20
Heap corruption bugfix... fixed:; ; - Heap corruption from BLE stack (hangover from BETA online build?); - BLEDevice can't be brought up in static context; - Calling scheduler callback when scheduler not initialised; - Rewrite of MicroBitImage linear bufs

Who changed what in which revision?

UserRevisionLine numberNew contents of line
finneyj 1:3e0360107f98 1 #include "inc/MicroBit.h"
finneyj 4:f998ee705a20 2 #include "inc/MicroBitMagnetometer.h"
finneyj 1:3e0360107f98 3 #include "inc/MicroBitMessageBus.h"
finneyj 4:f998ee705a20 4
finneyj 1:3e0360107f98 5 /**
finneyj 1:3e0360107f98 6 * Constructor.
finneyj 4:f998ee705a20 7 * Create a magnetometer representation with the given ID.
finneyj 4:f998ee705a20 8 * @param id the ID of the new object.
finneyj 4:f998ee705a20 9 * @param address the I2C address of the device.
finneyj 1:3e0360107f98 10 */
finneyj 4:f998ee705a20 11 MicroBitMagnetometer::MicroBitMagnetometer(int id, int address)
finneyj 1:3e0360107f98 12 {
finneyj 1:3e0360107f98 13 this->id = id;
finneyj 4:f998ee705a20 14 this->address = address;
finneyj 1:3e0360107f98 15 }
finneyj 1:3e0360107f98 16
finneyj 1:3e0360107f98 17 /**
finneyj 4:f998ee705a20 18 * Gets the current heading of the device, relative to magnetic north.
finneyj 4:f998ee705a20 19 * @return the current heading, in degrees.
finneyj 1:3e0360107f98 20 */
finneyj 4:f998ee705a20 21 int MicroBitMagnetometer::heading()
finneyj 1:3e0360107f98 22 {
finneyj 4:f998ee705a20 23 return 0;
finneyj 1:3e0360107f98 24 }
finneyj 1:3e0360107f98 25
finneyj 1:3e0360107f98 26