Output timezone as a decimal number.
This commit is contained in:
parent
bc4c6cfcaa
commit
4acb55c2e6
|
@ -122,7 +122,7 @@ void ConsoleReader::listSockets()
|
|||
for (std::vector<Socket*>::const_iterator i = sockets->begin() ; i != sockets->end(); ++i) {
|
||||
std::cout << "_____________________________________________________________________________\n" << std::endl;
|
||||
std::cout << "IP Address: " << (*i)->ip.toString().toStdString() << "\t MAC Address: " << (*i)->mac.toHex().toStdString() << "\t Power: " << ((*i)->powered ? "On" : "Off") << std::endl;
|
||||
std::cout << "Socket Name: " << (*i)->socketName.toStdString() << "\t Remote Password: " << (*i)->remotePassword.toStdString() << "\t Timezone: " << (*i)->timeZone.toHex().toStdString() << std::endl;
|
||||
std::cout << "Socket Name: " << (*i)->socketName.toStdString() << "\t Remote Password: " << (*i)->remotePassword.toStdString() << "\t Timezone: " << +(*i)->timezone << std::endl;
|
||||
std::cout << "Countdown: " << (*i)->countdown << " " << ((*i)->countdownEnabled ? "(enabled)" : "(disabled)") << "\t\t Time: " << (*i)->socketDateTime.toString().toStdString() << std::endl;
|
||||
}
|
||||
std::cout << "_____________________________________________________________________________\n" << std::endl;
|
||||
|
|
17
socket.cpp
17
socket.cpp
File diff suppressed because one or more lines are too long
4
socket.h
4
socket.h
|
@ -56,7 +56,7 @@ public:
|
|||
QByteArray mac;
|
||||
bool powered;
|
||||
QByteArray socketName, remotePassword;
|
||||
QByteArray timeZone;
|
||||
int8_t timezone;
|
||||
uint16_t countdown;
|
||||
bool countdownEnabled;
|
||||
QDateTime socketDateTime;
|
||||
|
@ -81,7 +81,7 @@ private:
|
|||
start();
|
||||
}
|
||||
void run();
|
||||
void writeSocketData(QByteArray socketName, QByteArray remotePassword, QByteArray timeZone, uint16_t countdown);
|
||||
void writeSocketData(QByteArray socketName, QByteArray remotePassword, int8_t timeZone, uint16_t countdown);
|
||||
QByteArray intToHex(unsigned int value, unsigned int length, bool littleEndian = true);
|
||||
int hexToInt(QByteArray value, bool littleEndian = true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue