2013-09-07 10:46:05 -04:00
|
|
|
#include "Arduino.h"
|
|
|
|
|
#include "Node.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Construct node version
|
|
|
|
|
//
|
2017-01-25 16:08:41 -05:00
|
|
|
void Node::setVersion(byte* rType, byte rFlag, byte* rVersion, const char* rCode)
|
2013-09-07 10:46:05 -04:00
|
|
|
{
|
|
|
|
|
char compileDate[0x10] = __DATE__;
|
|
|
|
|
char compileTime[0x10] = __TIME__;
|
|
|
|
|
memcpy(nodeVersion, rType, 4);
|
|
|
|
|
nodeVersion[4] = rFlag;
|
|
|
|
|
memcpy(nodeVersion+4+1, rVersion, 3);
|
|
|
|
|
memcpy(nodeVersion+8, rCode,4);
|
|
|
|
|
memcpy(nodeVersion+8+4, compileDate, 0x10);
|
|
|
|
|
memcpy(nodeVersion+8+4+16, compileTime, 0x10);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Return node version
|
|
|
|
|
//
|
|
|
|
|
const char* Node::getVersion()
|
|
|
|
|
{
|
|
|
|
|
return nodeVersion;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|