1
BallastController.cpp
- Committer:
- sk398
- Date:
- 2016-03-10
- Revision:
- 2:9164b1d0b53d
- Parent:
- 0:8380ab528739
File content as of revision 2:9164b1d0b53d:
/* ##################################################################### SD20.cpp -------- Surface Ship, Group 5 --------------------- Written by: Steven Kay Date: February 2016 Function: This Version: 1.0 Version History --------------- 1.1 rgdfgdfgdfggdfgdg 1.0 gdgddfdddgd ##################################################################### */ #include "mbed.h" #include "BallastController.h" BallastController::BallastController( PinName S1_D,PinName S1_CLK, PinName S2_D,PinName S2_CLK, PinName S3_D,PinName S3_CLK, PinName S4_D,PinName S4_CLK ) { Solenoids[0] = new Latch_FET_Driver(S1_D,S1_CLK); Solenoids[1] = new Latch_FET_Driver(S2_D,S2_CLK); Solenoids[2] = new Latch_FET_Driver(S3_D,S3_CLK); Solenoids[3] = new Latch_FET_Driver(S4_D,S4_CLK); } void BallastController::outputToSolenoids(bool *states) { for(int a = 0; a < 4; a++) { BallastController::Solenoids[a] -> changeOutputState(*(states+a)); } }