Skip to content

Commit 5556a69

Browse files
committed
Clean up comments
1 parent 99731ff commit 5556a69

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

smc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ int main(int argc, char *argv[]) {
333333
int coreOffset = 0;
334334
if (SMCGetTemperature("TC0C") == 0 && SMCGetTemperature("TC0c") == 0) {
335335
// https://logi.wiki/index.php/SMC_Sensor_Codes
336-
// macbookpro first core temperature = TC1C code(key)
336+
// If the temperature of the core at index 0 is 0, use MacBook Pro core numbers (which start at 1).
337337
coreOffset = 1;
338338
}
339339
for (int i = 0; i < coreCount; ++i)
@@ -344,7 +344,7 @@ int main(int argc, char *argv[]) {
344344
double firstCoreTemperature = getTemperatureKeyTemplate(coreList[0], templateKey);
345345

346346
if (firstCoreTemperature == 0) {
347-
// The first core does not exist
347+
// The first core does not exist.
348348
printf("The specified core (%lu) does not exist.\n", coreList[0]);
349349
exit(1);
350350
}
@@ -357,7 +357,7 @@ int main(int argc, char *argv[]) {
357357
double temperature = SMCGetTemperature(key);
358358

359359
if (temperature == 0) {
360-
// The specified core does not exist
360+
// The specified core does not exist.
361361
printf("The specified core (%lu) does not exist.\n", coreList[i]);
362362
exit(1);
363363
}
@@ -367,10 +367,10 @@ int main(int argc, char *argv[]) {
367367
break;
368368
}
369369
case package: {
370-
// https://logi.wiki/index.php/SMC_Sensor_Codes
371-
// try again with macbookpro cpu proximity temperature = TC0P code(key)
372370
double cpuTemperature = SMCGetTemperature(SMC_CPU_DIE_TEMP);
373371
if (cpuTemperature == 0) {
372+
// https://logi.wiki/index.php/SMC_Sensor_Codes
373+
// If the first SMC sensor code isn't recognised, use the MacBook Pro cpu proximity temperature.
374374
cpuTemperature = SMCGetTemperature(SMC_CPU_PROXIMITY_TEMP);
375375
}
376376
printTemperature(convertToCorrectScale(scale, cpuTemperature), rounding);

0 commit comments

Comments
 (0)