int64_t getPosition(int fd, uint8_t nodeId) { ZO_PROTOCOL_PACKET p; p.addressedNodeID = nodeId; p.ownNodeID = 0x01; p.commandID = 0x6F; p.byteCount = 0x00; p.lrc = 0x6F; if( putPacketSerial(fd, &p) ) { if( getResponse(fd, &p) ) return strToS64(p.data); else return -1; } else return -1; }
int64_t zoSms::getPosition(uint8_t nodeId) { ZO_PROTOCOL_PACKET p; p.addressedNodeID = nodeId; p.ownNodeID = 1; p.commandID = 0x6F; p.byteCount = 0; p.lrc = 0x6F; if( ha.putPacket(&p) ) { if( getResponse(&p) ) return strToS64(p.data); else //ATTENTION return -1; } else return -1; }