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
src/main.cpp
- Committer:
- mfwic
- Date:
- 2019-03-09
- Revision:
- 42:3ae73b61f657
- Parent:
- 41:bd54c88e3334
- Child:
- 43:291bbdba48f3
File content as of revision 42:3ae73b61f657:
//------------------------------------------------------------------------------- // // Treehouse Designs Inc. // Colorado Springs, Colorado // // Copyright (c) 2018 by Treehouse Designs Inc. // Copyright (c) 2018 by Agility Power Systems Inc. // // This code is the property of Treehouse Designs, Inc. (Treehouse) and // Agility Power Systems Inc. (Agility) and may not be redistributed // in any form without prior written permission from // both copyright holders, Treehouse and Agility. // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // //------------------------------------------------------------------------------- // // REVISION HISTORY: // // $Author: $ // $Rev: $ // $Date: $ // $URL: $ // //------------------------------------------------------------------------------- #include "mbed.h" #include "math.h" #include "globals.h" #include "parameters.h" #include "all_io.h" #include "stdio.h" #include "stdlib.h" #include "serial.h" #include "adc.h" #include "adc_defs.h" #include "menu.h" #include "boards.h" #include "command.h" #include "clocks.h" //DigitalOut myled(LED1); Ticker slowClk; Ticker fastClk; unsigned short my12=0; volatile bool updateReady = FALSE; unsigned int loopTime = 0; bool raw = FALSE; bool running = FALSE; bool testing = FALSE; bool buck = TRUE; double CURRENT_48_OFFSET = 33940; double CURRENT_24_OFFSET = 33580; double CURRENT_12_OFFSET = 33256; volatile bool dosFlip = FALSE; volatile bool dofFlip = FALSE; void slowFlip() { dosFlip = TRUE; } void fastFlip() { dofFlip = TRUE; } int main() { initOut(); slowClk.attach(&slowFlip, 0.0003); fastClk.attach(&fastFlip, 0.00001); while(1){ checkFlip(); } }