Added getSdCardHandler method to SdCardManager class

This commit is contained in:
anschrammh 2019-03-03 22:47:54 +01:00
parent 218d9c3eeb
commit becaad5584
4 changed files with 50 additions and 7 deletions

View File

@ -169,7 +169,7 @@
"top": 812,
"width": 624.67919921875,
"height": 13,
"text": "-sdCard: SD",
"text": "-sdCard: SDClass",
"horizontalAlignment": 0
},
{
@ -4268,7 +4268,7 @@
"top": 1174,
"width": 335.98779296875,
"height": 13,
"text": "-sdCardRef: SD&",
"text": "-sdCardRef: SDlass&",
"horizontalAlignment": 0
}
],
@ -4321,13 +4321,30 @@
"height": 13,
"text": "+const getSize(sizeUnit: const SizeUnit = GBYTE): double",
"horizontalAlignment": 0
},
{
"_type": "UMLOperationView",
"_id": "AAAAAAFpRYJJAA467cY=",
"_parent": {
"$ref": "AAAAAAFpKneDcx8Vby4="
},
"model": {
"$ref": "AAAAAAFpRYJIxg4oepo="
},
"font": "Arial;13;0",
"left": 805,
"top": 1227,
"width": 335.98779296875,
"height": 13,
"text": "+getSdCardHandler(): SDClass&",
"horizontalAlignment": 0
}
],
"font": "Arial;13;0",
"left": 800,
"top": 1192,
"width": 345.98779296875,
"height": 38
"height": 53
},
{
"_type": "UMLReceptionCompartmentView",
@ -6209,7 +6226,7 @@
},
"name": "sdCard",
"visibility": "private",
"type": "SD"
"type": "SDClass"
},
{
"_type": "UMLAttribute",
@ -7867,7 +7884,7 @@
},
"name": "sdCardRef",
"visibility": "private",
"type": "SD&"
"type": "SDlass&"
}
],
"operations": [
@ -7919,6 +7936,25 @@
"direction": "return"
}
]
},
{
"_type": "UMLOperation",
"_id": "AAAAAAFpRYJIxg4oepo=",
"_parent": {
"$ref": "AAAAAAFpKneDcR8MzCI="
},
"name": "getSdCardHandler",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAFpRYK3Iw6tRwM=",
"_parent": {
"$ref": "AAAAAAFpRYJIxg4oepo="
},
"type": "SDClass&",
"direction": "return"
}
]
}
]
},

View File

@ -37,3 +37,8 @@ double SDCardManager::getSize(const SizeUnit sizeUnit) const
return result;
}
SDClass& SDCardManager::getSdCardHandler()
{
return _sdCardRef;
}

View File

@ -8,6 +8,7 @@ class SDCardManager
friend class SAB;
public:
double getSize(const SizeUnit sizeUnit = GBYTE) const;
SDClass& getSdCardHandler();
protected:
SDCardManager(SDClass& sdCard);
private:

View File

@ -4,7 +4,7 @@
#include "views.h"
SAB sab;
unsigned char *memoryEater = NULL;
long *memoryEater = NULL;
unsigned long currentMs = 0;
int mySize = 0;
@ -33,7 +33,8 @@ void loop() {
dtp.dateTime = sab.getRtcManager().getDateTime();
sab.getScreenManager().displayView(1);
unsigned char *temp = (unsigned char *) realloc(memoryEater,sizeof(unsigned char) * ++mySize);
long *temp = (long *) realloc(memoryEater,sizeof(long) * ++mySize);
if(temp != NULL)
memoryEater = temp;
else