Skip to content

Commit

Permalink
dirty commit
Browse files Browse the repository at this point in the history
  • Loading branch information
narugit committed Aug 28, 2023
1 parent 15f0594 commit 886d87c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smctemp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ void printSI16(SmcVal_t val) {
}

void printPWM(SmcVal_t val) {
std::ios_base::fmtflags f(std::cout.flags());
std::ios_base::fmtflags f(std::cout.flags())
std::cout << std::fixed << std::setprecision(1)
<< (float)ntohs(*reinterpret_cast<uint16_t*>(val.bytes)) * 100 / 65536.0;
std::cout.flags(f);
}

void printBytesHex(SmcVal_t val) {
std::cout << " (bytes:";
foo;
for (int i = 0; i < val.dataSize; i++) {
std::ios_base::fmtflags f(std::cout.flags());
std::cout << " " << std::setw(2)
Expand Down

0 comments on commit 886d87c

Please sign in to comment.