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: 2019_SwitchNode_AR ArmNode 2919_LineSensor 2019_MD ... more
Diff: Mycan.cpp
- Revision:
- 2:67a12201e80b
- Parent:
- 1:e632e292a8c2
- Child:
- 3:055c2d38132f
--- a/Mycan.cpp Wed Jul 04 07:49:29 2018 +0000 +++ b/Mycan.cpp Tue Jul 10 12:37:13 2018 +0000 @@ -37,9 +37,10 @@ void Mycan::_expressAbsoluteValue() { + write_val[0] = 0; for (int i = 1; i < 8; i++) { - if (write_val[i] > 0) + if (write_val[i] >= 0) write_val[0] &= ~(1 << i); else write_val[0] |= (1 << i);