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 CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: SysMngmt.h
- Revision:
- 0:e516fcccccda
diff -r 000000000000 -r e516fcccccda SysMngmt.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SysMngmt.h Wed Oct 01 12:52:26 2014 +0000
@@ -0,0 +1,42 @@
+#ifndef _SYSMNGMT_
+#define _SYSMNGMT_
+#include "mbed.h"
+
+#define MSEC_HRS 2.77778e-7
+#define DC_DC_ISENSE_OFFSET_V 0.5
+#define DC_DC_ISENSE_INCREMENT 0.133
+
+#define BAT_ISENSE_OFFSET_V 1.65
+#define BAT_ISENSE_INCREMENT 0.5297
+
+Serial pc(USBTX,USBRX);
+CAN CAN_SysM(p30,p29);
+
+//Temperature Input
+AnalogIn Coolant1(p17); //Brass ones
+AnalogIn Coolant2(p16); //Brass ones
+AnalogIn DC_DC(p18); //Murata
+AnalogIn ChargerFET(p15);//Murata
+AnalogIn BatISense(p19);
+AnalogIn DCSense(p20);
+
+typedef union convert{
+ float FLOAT;
+ char C_FLOAT[4];
+ }ftc;
+
+// Call function at reccuring interval
+Ticker ReadIMD, PollSDSwitch, ReadTemperature, ReadBatteryState;
+
+double BATmA_Hr;
+float DCA_msec,BATA_msec;
+float Bat_I_Ratio,DC_I_Ratio;
+CANMessage RxBuffer[10]={};
+
+/*
+PwmOut Pump(p26);
+PwmOut Fan1(p25);
+PwmOut Fan2(p24);
+PwmOut Fan3(p23);
+*/
+#endif /* _SYSMNGMT_ */
\ No newline at end of file
