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: DC_DC/DC_DC.cpp
- Revision:
- 22:fc802e7715f8
- Parent:
- 21:2e83002d452d
- Child:
- 23:ebdb30592a4b
--- a/DC_DC/DC_DC.cpp Fri Nov 07 01:26:37 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#include "mbed.h"
-#include "DC_DC.h"
-
-FanPump *fanPump;
-CANBuffer *tx_DC_Buffer;
-bool status;
-
-DigitalOut dc_pin(p20);
-
-DC::DC(FanPump *fp, CANBuffer *can){
- status = false;
- dc_pin = !status;
- tx_DC_Buffer = can;
- fanPump = fp;
-}
-
-bool DC::is_on(){
- return status;
-}
-
-void DC::set(bool s){/*
- status = s;
- if(!status){
- fanPump->shutdown_all();
- }
-
- dc_pin = !status;*/
-}
-
-void update_dcdc(const void *arg){
- char data[1] = {0};
- while(1){
- data[0] = status;
- CANMessage txMessage(TX_DC_DC_ID, data, 1);
- tx_DC_Buffer->txWrite(txMessage);
-
- Thread::wait(100); //10 Hz update
- }
-}
-
-void DC::start_update(){
- Thread update_thread(update_dcdc);
-}
\ No newline at end of file
