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 LCD_DISCO_F469NIa SD_DISCO_F469NI BSP_DISCO_F469NIa EEPROM_DISCO_F469NI
Diff: main.cpp
- Revision:
- 4:0e8413277df8
- Parent:
- 3:a06e417a5a2c
- Child:
- 6:1fda11b7b0b9
diff -r a06e417a5a2c -r 0e8413277df8 main.cpp
--- a/main.cpp Thu Jul 05 20:18:32 2018 +0000
+++ b/main.cpp Sat Jul 07 14:42:17 2018 +0000
@@ -14,12 +14,12 @@
Timer t_int,t_store;
// Variables received from DTA, LVDTs and brakes
-uint16_t Rpm0=0,Speed0=0,Gear0=0,Water_Temp0=0,Oil_Temp0=0,TPS0=0,Brakes0=0,Oil_P0=0,MAP0=0,Air_Temp0=0,Lambda0=0,Volts0=0,Crank0=0;
-uint16_t Rpm=0,Speed=0,Gear=0,Water_Temp=0,Oil_Temp=0,TPS=0,Brakes=0,Oil_P=0,MAP=0,Air_Temp=0,Lambda=0,Volts=0,Crank=0;
+uint16_t Rpm0=0,Speed0=0,Gear0=0,Water_Temp0=0,Oil_Temp0=0,TPS0=0,Brakes0=0,MAP0=0,Air_Temp0=0,Lambda0=0,Volts0=0;
+uint16_t Rpm=0,Speed=0,Gear=0,Water_Temp=0,Oil_Temp=0,TPS=0,Brakes=0,MAP=0,Air_Temp=0,Lambda=0,Volts=0;
int FL_LVDT0=0,FR_LVDT0=0,RL_LVDT0=0,RR_LVDT0=0,FL_LVDT=0,FR_LVDT=0,RL_LVDT=0,RR_LVDT=0;
//Referrent LVDT values. First received value is referrent.
int FL_LVDT_Ref,FR_LVDT_Ref,RL_LVDT_Ref,RR_LVDT_Ref;
-float Meter_counter=0,Meter_counter0=0;
+//float Meter_counter=0,Meter_counter0=0;
uint8_t change_flag=0;
uint16_t rx_flag=0x0000; // Receive specific CAN data message
@@ -49,13 +49,11 @@
void LEDInitialize(){
reset.write(1);
- wait(1);
// set port as output
cmd[0]=0x06;
cmd[1]=0x00;
cmd[2]=0x00;
i2c.write(addr,cmd,3);
- pc.printf( "cao\n");
}
void showLedRpm(int RPM){
@@ -77,7 +75,6 @@
cmd[2]=0xC7;
}
else if (RPM <5000) {
- pc.printf("tu sam %d\n", RPM);
cmd[1]=0xFF;
cmd[2]=0xC3;
}