For Hepta-Sat Lite
Revision 13:59679840fb53, committed 2021-08-17
- Comitter:
- heptasat2021
- Date:
- Tue Aug 17 10:50:19 2021 +0000
- Parent:
- 12:94abebd3d020
- Commit message:
- For Hepta-Sat Lite
Changed in this revision
HeptaXbee.cpp | Show annotated file Show diff for this revision Revisions of this file |
HeptaXbee.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 94abebd3d020 -r 59679840fb53 HeptaXbee.cpp --- a/HeptaXbee.cpp Wed Aug 21 11:18:56 2019 +0000 +++ b/HeptaXbee.cpp Tue Aug 17 10:50:19 2021 +0000 @@ -2,10 +2,11 @@ #include "mbed.h" #include <stdarg.h> -HeptaXbee::HeptaXbee(PinName tx, PinName rx) : xbee(tx,rx) +HeptaXbee::HeptaXbee(PinName tx, PinName rx, int brate) : xbee(tx,rx),comrate(brate) { rcmd = 0; cmdflag = 0; + xbee.baud(comrate); } void HeptaXbee::baud(int rate) {
diff -r 94abebd3d020 -r 59679840fb53 HeptaXbee.h --- a/HeptaXbee.h Wed Aug 21 11:18:56 2019 +0000 +++ b/HeptaXbee.h Tue Aug 17 10:50:19 2021 +0000 @@ -8,11 +8,13 @@ { public: Serial xbee; + int comrate; int rcmd; int cmdflag; HeptaXbee( PinName tx, - PinName rx + PinName rx, + int brate ); void baud(int rate); void xbee_receive(int *xrcmd, int *xcmdflag);