Skip to content

Commit 18f241c

Browse files
author
Charles
committed
change printouts and change second question to default true
1 parent 6067372 commit 18f241c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

app/tool/tasks/get_lpgbt_temps.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void get_lpgbt_temps(Target* tgt) {
134134
bool verify = pftool::readline_bool(
135135
"Using precise constants may require downloading and unzipping a large "
136136
"CSV file (330 MB) - Continue?",
137-
false);
137+
true);
138138
if (!verify) {
139139
printf(" > Continuing with average constants...\n");
140140
lpgbt_card.read_internal_temp_avg();

src/pflib/lpGBT.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,15 @@ int lpGBT::find_vref_tune(double vref_slope, double vref_offset,
386386

387387
void lpGBT::read_internal_temp_avg() {
388388
double adc_avg = adc_average();
389-
printf(" > ADC Average: %f\n", adc_avg);
390389
double tj_user = adc_avg * AVG_TEMPERATURE_UNCALVREF_SLOPE +
391390
AVG_TEMPERATURE_UNCALVREF_OFFSET;
392-
printf(" > Esitimated junction temperature (TJ_USER): %f degrees C\n",
393-
tj_user);
394-
395391
double vadc_v =
396392
adc_avg * (AVG_ADC_X2_SLOPE + tj_user * AVG_ADC_X2_SLOPE_TEMP) +
397393
AVG_ADC_X2_OFFSET + tj_user * AVG_ADC_X2_OFFSET_TEMP;
394+
395+
printf(" > ADC Average: %f\n", adc_avg);
396+
printf(" > Esitimated junction temperature (TJ_USER): %f degrees C\n",
397+
tj_user);
398398
printf(" > Calibrated Voltage: %.4f V\n", vadc_v);
399399

400400
double temperature_c =
@@ -429,6 +429,10 @@ void lpGBT::read_internal_temp_precise(YAML::Node cal_data) {
429429
double adc_avg = adc_average();
430430
double vadc_v = adc_avg * (ADC_SLOPE + tj_user * ADC_SLOPE_TEMP) +
431431
ADC_OFFSET + tj_user * ADC_OFFSET_TEMP;
432+
433+
printf(" > ADC Average: %f\n", adc_avg);
434+
printf(" > Esitimated junction temperature (TJ_USER): %f degrees C\n",
435+
tj_user);
432436
printf(" > Calibrated Voltage: %.4f V\n", vadc_v);
433437

434438
double temperature_c = (vadc_v * TEMP_SLOPE) + TEMP_OFFSET;

0 commit comments

Comments
 (0)