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.
Dependencies: mbed
Revision 7:3352a96997b3, committed 2019-11-14
- Comitter:
- armin1376
- Date:
- Thu Nov 14 00:31:13 2019 +0000
- Parent:
- 6:e7c29e46ad6c
- Commit message:
- Shows speed and current values but not temp
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 13 23:34:18 2019 +0000
+++ b/main.cpp Thu Nov 14 00:31:13 2019 +0000
@@ -78,6 +78,7 @@
while(1){
+
if(can2.read(msg) && msg.id == (MC_BASE+MC_VEL)) {
for (int i = 0; i < msg.len; i++) {
rdata2[i] = msg.data[i];
@@ -115,6 +116,7 @@
can1.frequency(125000);
Thread V1(speeed);
+
float current = MAX_CURRENT;
float velocity = MAX_VELOCITY;
@@ -333,7 +335,7 @@
if (!can1.write(CANMessage(0x242, (char*) rdata, 8))) {
pc.printf("Cannot write to CAN\n");
}
-// wait(0.001);
+ wait(0.1);
urxdata.rcvdata[3] = rdata[7];
urxdata.rcvdata[2] = rdata[6];
@@ -457,7 +459,7 @@
if (!can1.write(CANMessage(0x24B, (char*) rdata7, 8))) {
pc.printf("Cannot write to CAN\n");
}
-// wait(0.001);
+ wait(0.1);
urxdata.rcvdata[3] = rdata7[7];
urxdata.rcvdata[2] = rdata7[6];