Treehouse Mbed Team / Mbed 2 deprecated APS_DCM1SL

Dependencies:   mbed

Committer:
mfwic
Date:
Sun Nov 25 00:36:35 2018 +0000
Revision:
1:9f8583ba2431
Child:
3:d8948c5b2951
Code compiles after major surgery.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfwic 1:9f8583ba2431 1 //-------------------------------------------------------------------------------
mfwic 1:9f8583ba2431 2 //
mfwic 1:9f8583ba2431 3 // Treehouse Inc.
mfwic 1:9f8583ba2431 4 // Colorado Springs, Colorado
mfwic 1:9f8583ba2431 5 //
mfwic 1:9f8583ba2431 6 // Copyright (c) 2016 by Treehouse Designs Inc.
mfwic 1:9f8583ba2431 7 //
mfwic 1:9f8583ba2431 8 // This code is the property of Treehouse, Inc. (Treehouse) and may not be redistributed
mfwic 1:9f8583ba2431 9 // in any form without prior written permission from the copyright holder, Treehouse.
mfwic 1:9f8583ba2431 10 //
mfwic 1:9f8583ba2431 11 // The above copyright notice and this permission notice shall be included in
mfwic 1:9f8583ba2431 12 // all copies or substantial portions of the Software.
mfwic 1:9f8583ba2431 13 //
mfwic 1:9f8583ba2431 14 //-------------------------------------------------------------------------------
mfwic 1:9f8583ba2431 15 //
mfwic 1:9f8583ba2431 16 // REVISION HISTORY:
mfwic 1:9f8583ba2431 17 //
mfwic 1:9f8583ba2431 18 // $Author: $
mfwic 1:9f8583ba2431 19 // $Rev: $
mfwic 1:9f8583ba2431 20 // $Date: $
mfwic 1:9f8583ba2431 21 // $URL: $
mfwic 1:9f8583ba2431 22 //
mfwic 1:9f8583ba2431 23 //-------------------------------------------------------------------------------
mfwic 1:9f8583ba2431 24
mfwic 1:9f8583ba2431 25 #include "mbed.h"
mfwic 1:9f8583ba2431 26 #include "serial.h"
mfwic 1:9f8583ba2431 27 #include "menu.h"
mfwic 1:9f8583ba2431 28
mfwic 1:9f8583ba2431 29 // clears terminal
mfwic 1:9f8583ba2431 30 void clrScrn(void){
mfwic 1:9f8583ba2431 31 sprintf( strbuf, "%c[2J", 27 ); // ESC=27, Clear screen = [2J
mfwic 1:9f8583ba2431 32 sendSerial(strbuf);
mfwic 1:9f8583ba2431 33 sprintf( strbuf, "%c[f", 27 ); // ESC=27, Move cursor to upper-left corner = [f
mfwic 1:9f8583ba2431 34 sendSerial(strbuf);
mfwic 1:9f8583ba2431 35 }
mfwic 1:9f8583ba2431 36
mfwic 1:9f8583ba2431 37 // clears terminal and re-draws main menu
mfwic 1:9f8583ba2431 38 void menuRedraw(void){
mfwic 1:9f8583ba2431 39 clrScrn();
mfwic 1:9f8583ba2431 40 sprintf(strbuf, "Agility Power Systems DCM1 Menu 0.1");
mfwic 1:9f8583ba2431 41 sendSerial(strbuf);
mfwic 1:9f8583ba2431 42 sprintf(strbuf, "\r\nMULT");
mfwic 1:9f8583ba2431 43 sendSerial(strbuf);
mfwic 1:9f8583ba2431 44 sprintf(strbuf, "\r\nBRDS");
mfwic 1:9f8583ba2431 45 sendSerial(strbuf);
mfwic 1:9f8583ba2431 46 sprintf(strbuf, "\r\nALLOFF");
mfwic 1:9f8583ba2431 47 sendSerial(strbuf);
mfwic 1:9f8583ba2431 48 sprintf(strbuf, "\r\nRUN [xx]");
mfwic 1:9f8583ba2431 49 sendSerial(strbuf);
mfwic 1:9f8583ba2431 50 sprintf(strbuf, "\r\nSTOP");
mfwic 1:9f8583ba2431 51 sendSerial(strbuf);
mfwic 1:9f8583ba2431 52 }