Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions smc-command/smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void printFLT(SMCVal_t val)
{
float fval;
memcpy(&fval,val.bytes,sizeof(float));
printf("%.0f ", fval);
printf("%f ", fval);
}

void printFP1F(SMCVal_t val)
Expand Down Expand Up @@ -271,8 +271,6 @@ void printVal(SMCVal_t val)
printSI16(val);
else if (strcmp(val.dataType, DATATYPE_PWM) == 0 && val.dataSize == 2)
printPWM(val);
else if (strcmp(val.dataType, DATATYPE_FLT) == 0 && val.dataSize == 4)
printFLT(val);

printBytesHex(val);
}
Expand Down Expand Up @@ -632,6 +630,12 @@ kern_return_t SMCPrintTemps(void)
printSP78(val);
printf("\n");
}
else if (strcmp(val.dataType, DATATYPE_FLT) == 0 && val.dataSize == 4)
{
printf("%-4s ", val.key);
printFLT(val);
printf("\n");
}
}

return kIOReturnSuccess;
Expand Down