Antoine C / Mbed 2 deprecated Copy_Assignment3

Dependencies:   mbed MCP23017 WattBob_TextLCD mbed-rtos

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers my_structures.cpp Source File

my_structures.cpp

00001 #include "my_structures.h"
00002 
00003 /* Initialize the values of the structure */
00004 void initRAWValuesStruct(struct engineRAWValues &structVal)
00005 {
00006     structVal.engineState       = false;
00007     structVal.acceleratorValue  = 0;
00008     structVal.acceleratorValue  = 0;
00009 }
00010 
00011 /* Initialize the values of the structure */
00012 void initCarStatisticsStruct(carStatistics &structStat, vector<float> *speedVec)
00013 {
00014     structStat.p_speedVector = speedVec;
00015     structStat.sizeOfAvg     = SIZE_AVG_SPEED;
00016     structStat.averageSpeed  = 0;
00017     structStat.distance      = 0;
00018 }
00019 
00020 /* Initialize the values of the structure */
00021 void initMailStructure(mailStruct &structMail)
00022 {
00023     structMail.avgSpeed     = 0;
00024     structMail.accelerator  = 0;
00025     structMail.brake        = 0;
00026 }