mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 16:06:38 +02:00
* fixed issues (found during unit test)
This commit is contained in:
parent
32e58c98c0
commit
af4960f1c4
4 changed files with 30 additions and 20 deletions
|
@ -2,7 +2,9 @@
|
|||
#define __HM_SYSTEM_H__
|
||||
|
||||
#include "hmInverter.h"
|
||||
#ifndef NO_RADIO
|
||||
#include "hmRadio.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -34,7 +36,8 @@ class HmSystem {
|
|||
p->id = mNumInv;
|
||||
p->serial.u64 = serial;
|
||||
p->type = type;
|
||||
uint8_t len = strlen(name);
|
||||
p->init();
|
||||
uint8_t len = (uint8_t)strlen(name);
|
||||
strncpy(p->name, name, (len > MAX_NAME_LENGTH) ? MAX_NAME_LENGTH : len);
|
||||
|
||||
if(NULL == p->assign) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue