Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: IZU2020_AVIONICS IZU2020_AVIONICS
Revision 3:252d161776cc, committed 2019-12-04
- Comitter:
- tanahashi
- Date:
- Wed Dec 04 09:37:02 2019 +0000
- Parent:
- 2:2a98c184354f
- Child:
- 4:9e7136efda5c
- Commit message:
- added POWER_LSB
Changed in this revision
| PQINA226.cpp | Show annotated file Show diff for this revision Revisions of this file |
| PQINA226.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/PQINA226.cpp Wed Dec 04 08:18:37 2019 +0000
+++ b/PQINA226.cpp Wed Dec 04 09:37:02 2019 +0000
@@ -53,5 +53,5 @@
cmd[0] = POWER;
_i2c->write(_addr, cmd, 1);
_i2c->read(_addr, buff, 2);
- *power = (short)(buff[0] << 8 | buff[1]);
+ *power = (short)(buff[0] << 8 | buff[1]) * POWER_LSB;
}
--- a/PQINA226.h Wed Dec 04 08:18:37 2019 +0000
+++ b/PQINA226.h Wed Dec 04 09:37:02 2019 +0000
@@ -7,6 +7,7 @@
#define CALIBRATION 0x05
#define WHO_AM_I 0xFF
#define VOLTAGE_LSB 1.25
+#define POWER_LSB 25
typedef enum A0 {
A0_GND = 0b00,