Skip to content

Commit 1aaa826

Browse files
committed
Rename 'HPSC' to 'HP'.
1 parent 0a34a82 commit 1aaa826

19 files changed

+323
-323
lines changed

cli/print_status.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static void print_errors(uint32_t errors, const char * error_set_name)
5252
}
5353
}
5454

55-
static void print_hpsc_driver_errors(uint32_t errors)
55+
static void print_hp_driver_errors(uint32_t errors)
5656
{
5757
const char * error_set_name = "Last motor driver errors";
5858
if (!errors)
@@ -67,7 +67,7 @@ static void print_hpsc_driver_errors(uint32_t errors)
6767
uint32_t error = (1 << i);
6868
if (errors & error)
6969
{
70-
std::cout << " - " << tic_look_up_hpsc_driver_error_name_ui(error)
70+
std::cout << " - " << tic_look_up_hp_driver_error_name_ui(error)
7171
<< std::endl;
7272
}
7373
}
@@ -298,7 +298,7 @@ void print_status(const tic::variables & vars,
298298
"Errors that occurred since last check");
299299
if (product == TIC_PRODUCT_36V4)
300300
{
301-
print_hpsc_driver_errors(vars.get_last_hpsc_driver_errors());
301+
print_hp_driver_errors(vars.get_last_hp_driver_errors());
302302
}
303303
std::cout << std::endl;
304304

gui/main_controller.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void main_controller::handle_variables_changed()
559559

560560
if (product == TIC_PRODUCT_36V4)
561561
{
562-
window->set_last_hpsc_driver_errors(variables.get_last_hpsc_driver_errors());
562+
window->set_last_hp_driver_errors(variables.get_last_hp_driver_errors());
563563
}
564564
else
565565
{
@@ -824,7 +824,7 @@ void main_controller::handle_settings_changed()
824824
window->set_current_limit(tic_settings_get_current_limit(s));
825825
if (settings.get_product() == TIC_PRODUCT_36V4)
826826
{
827-
window->set_decay_mode(tic_settings_get_hpsc_decmod(s));
827+
window->set_decay_mode(tic_settings_get_hp_decmod(s));
828828
}
829829
else
830830
{
@@ -873,10 +873,10 @@ void main_controller::handle_settings_changed()
873873
window->set_pin_analog(i, analog, analog_enabled);
874874
}
875875

876-
window->set_hpsc_toff(tic_settings_get_hpsc_toff(s));
877-
window->set_hpsc_tblank(tic_settings_get_hpsc_tblank(s));
878-
window->set_hpsc_abt(tic_settings_get_hpsc_abt(s));
879-
window->set_hpsc_tdecay(tic_settings_get_hpsc_tdecay(s));
876+
window->set_hp_toff(tic_settings_get_hp_toff(s));
877+
window->set_hp_tblank(tic_settings_get_hp_tblank(s));
878+
window->set_hp_abt(tic_settings_get_hp_abt(s));
879+
window->set_hp_tdecay(tic_settings_get_hp_tdecay(s));
880880

881881
window->set_apply_settings_enabled(connected() && settings_modified);
882882
}
@@ -1178,7 +1178,7 @@ void main_controller::handle_decay_mode_input(uint8_t decay_mode)
11781178
if (!connected()) { return; }
11791179
if (settings.get_product() == TIC_PRODUCT_36V4)
11801180
{
1181-
tic_settings_set_hpsc_decmod(settings.get_pointer(), decay_mode);
1181+
tic_settings_set_hp_decmod(settings.get_pointer(), decay_mode);
11821182
}
11831183
else
11841184
{
@@ -1220,34 +1220,34 @@ void main_controller::handle_agc_frequency_limit_input(uint8_t limit)
12201220
handle_settings_changed();
12211221
}
12221222

1223-
void main_controller::handle_hpsc_tdecay_input(uint8_t time)
1223+
void main_controller::handle_hp_tdecay_input(uint8_t time)
12241224
{
12251225
if (!connected()) { return; }
1226-
tic_settings_set_hpsc_tdecay(settings.get_pointer(), time);
1226+
tic_settings_set_hp_tdecay(settings.get_pointer(), time);
12271227
settings_modified = true;
12281228
handle_settings_changed();
12291229
}
12301230

1231-
void main_controller::handle_hpsc_toff_input(uint8_t time)
1231+
void main_controller::handle_hp_toff_input(uint8_t time)
12321232
{
12331233
if (!connected()) { return; }
1234-
tic_settings_set_hpsc_toff(settings.get_pointer(), time);
1234+
tic_settings_set_hp_toff(settings.get_pointer(), time);
12351235
settings_modified = true;
12361236
handle_settings_changed();
12371237
}
12381238

1239-
void main_controller::handle_hpsc_tblank_input(uint8_t time)
1239+
void main_controller::handle_hp_tblank_input(uint8_t time)
12401240
{
12411241
if (!connected()) { return; }
1242-
tic_settings_set_hpsc_tblank(settings.get_pointer(), time);
1242+
tic_settings_set_hp_tblank(settings.get_pointer(), time);
12431243
settings_modified = true;
12441244
handle_settings_changed();
12451245
}
12461246

1247-
void main_controller::handle_hpsc_abt_input(bool adaptive)
1247+
void main_controller::handle_hp_abt_input(bool adaptive)
12481248
{
12491249
if (!connected()) { return; }
1250-
tic_settings_set_hpsc_abt(settings.get_pointer(), adaptive);
1250+
tic_settings_set_hp_abt(settings.get_pointer(), adaptive);
12511251
settings_modified = true;
12521252
handle_settings_changed();
12531253
}

gui/main_controller.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ class main_controller
129129
void handle_agc_current_boost_steps_input(uint8_t);
130130
void handle_agc_frequency_limit_input(uint8_t);
131131

132-
void handle_hpsc_toff_input(uint8_t);
133-
void handle_hpsc_tblank_input(uint8_t);
134-
void handle_hpsc_abt_input(bool);
135-
void handle_hpsc_tdecay_input(uint8_t);
132+
void handle_hp_toff_input(uint8_t);
133+
void handle_hp_tblank_input(uint8_t);
134+
void handle_hp_abt_input(bool);
135+
void handle_hp_tdecay_input(uint8_t);
136136

137137
void handle_soft_error_response_input(uint8_t soft_error_response);
138138
void handle_soft_error_position_input(int32_t soft_error_position);

gui/qt/main_window.cpp

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void main_window::adjust_ui_for_product(uint8_t product)
194194
bool decay_mode_visible = false;
195195
bool agc_mode_visible = false;
196196
bool last_motor_driver_error_visible = false;
197-
bool hpsc_visible = false;
197+
bool hp_visible = false;
198198

199199
switch (product)
200200
{
@@ -275,15 +275,15 @@ void main_window::adjust_ui_for_product(uint8_t product)
275275
{ "1/256 step", TIC_STEP_MODE_MICROSTEP256 } });
276276

277277
set_combo_items(decay_mode_value,
278-
{ { "Slow", TIC_HPSC_DECMOD_SLOW },
279-
{ "Slow / mixed", TIC_HPSC_DECMOD_SLOW_MIXED },
280-
{ "Fast", TIC_HPSC_DECMOD_FAST },
281-
{ "Mixed", TIC_HPSC_DECMOD_MIXED },
282-
{ "Slow / auto-mixed", TIC_HPSC_DECMOD_SLOW_AUTO_MIXED },
283-
{ "Auto-mixed", TIC_HPSC_DECMOD_AUTO_MIXED }});
278+
{ { "Slow", TIC_HP_DECMOD_SLOW },
279+
{ "Slow / mixed", TIC_HP_DECMOD_SLOW_MIXED },
280+
{ "Fast", TIC_HP_DECMOD_FAST },
281+
{ "Mixed", TIC_HP_DECMOD_MIXED },
282+
{ "Slow / auto-mixed", TIC_HP_DECMOD_SLOW_AUTO_MIXED },
283+
{ "Auto-mixed", TIC_HP_DECMOD_AUTO_MIXED }});
284284
decay_mode_visible = true;
285285
last_motor_driver_error_visible = true;
286-
hpsc_visible = true;
286+
hp_visible = true;
287287
break;
288288
}
289289

@@ -302,7 +302,7 @@ void main_window::adjust_ui_for_product(uint8_t product)
302302
last_motor_driver_error_label->setVisible(last_motor_driver_error_visible);
303303
last_motor_driver_error_value->setVisible(last_motor_driver_error_visible);
304304

305-
hpsc_motor_widget->setVisible(hpsc_visible);
305+
hp_motor_widget->setVisible(hp_visible);
306306

307307
update_current_limit_table(product);
308308
}
@@ -618,9 +618,9 @@ void main_window::set_last_motor_driver_error(const char * str)
618618
last_motor_driver_error_value->setToolTip("");
619619
}
620620

621-
void main_window::set_last_hpsc_driver_errors(uint8_t errors)
621+
void main_window::set_last_hp_driver_errors(uint8_t errors)
622622
{
623-
const char * name = tic_look_up_hpsc_driver_error_name_ui(errors);
623+
const char * name = tic_look_up_hp_driver_error_name_ui(errors);
624624
QString toolTip = "0x" + QString::number(errors, 16);
625625
last_motor_driver_error_value->setText(name);
626626
last_motor_driver_error_value->setToolTip(toolTip);
@@ -1067,24 +1067,24 @@ void main_window::set_agc_frequency_limit(uint8_t limit)
10671067
set_combo(agc_frequency_limit_value, limit);
10681068
}
10691069

1070-
void main_window::set_hpsc_tdecay(uint8_t time)
1070+
void main_window::set_hp_tdecay(uint8_t time)
10711071
{
1072-
set_spin_box(hpsc_tdecay_value, time);
1072+
set_spin_box(hp_tdecay_value, time);
10731073
}
10741074

1075-
void main_window::set_hpsc_tblank(uint8_t time)
1075+
void main_window::set_hp_tblank(uint8_t time)
10761076
{
1077-
set_spin_box(hpsc_tblank_value, time);
1077+
set_spin_box(hp_tblank_value, time);
10781078
}
10791079

1080-
void main_window::set_hpsc_abt(bool adaptive)
1080+
void main_window::set_hp_abt(bool adaptive)
10811081
{
1082-
set_check_box(hpsc_abt_check, adaptive);
1082+
set_check_box(hp_abt_check, adaptive);
10831083
}
10841084

1085-
void main_window::set_hpsc_toff(uint8_t time)
1085+
void main_window::set_hp_toff(uint8_t time)
10861086
{
1087-
set_spin_box(hpsc_toff_value, time);
1087+
set_spin_box(hp_toff_value, time);
10881088
}
10891089

10901090
void main_window::set_soft_error_response(uint8_t soft_error_response)
@@ -1929,28 +1929,28 @@ void main_window::on_agc_frequency_limit_value_currentIndexChanged(int index)
19291929
controller->handle_agc_frequency_limit_input(limit);
19301930
}
19311931

1932-
void main_window::on_hpsc_tdecay_value_valueChanged(int value)
1932+
void main_window::on_hp_tdecay_value_valueChanged(int value)
19331933
{
19341934
if (suppress_events) { return; }
1935-
controller->handle_hpsc_tdecay_input(value);
1935+
controller->handle_hp_tdecay_input(value);
19361936
}
19371937

1938-
void main_window::on_hpsc_toff_value_valueChanged(int value)
1938+
void main_window::on_hp_toff_value_valueChanged(int value)
19391939
{
19401940
if (suppress_events) { return; }
1941-
controller->handle_hpsc_toff_input(value);
1941+
controller->handle_hp_toff_input(value);
19421942
}
19431943

1944-
void main_window::on_hpsc_tblank_value_valueChanged(int value)
1944+
void main_window::on_hp_tblank_value_valueChanged(int value)
19451945
{
19461946
if (suppress_events) { return; }
1947-
controller->handle_hpsc_tblank_input(value);
1947+
controller->handle_hp_tblank_input(value);
19481948
}
19491949

1950-
void main_window::on_hpsc_abt_check_stateChanged(int state)
1950+
void main_window::on_hp_abt_check_stateChanged(int state)
19511951
{
19521952
if (suppress_events) { return; }
1953-
controller->handle_hpsc_abt_input(state == Qt::Checked);
1953+
controller->handle_hp_abt_input(state == Qt::Checked);
19541954
}
19551955

19561956
void main_window::on_soft_error_response_radio_group_buttonToggled(int id, bool checked)
@@ -3410,17 +3410,17 @@ QLayout * main_window::setup_motor_settings_layout()
34103410
row++;
34113411
}
34123412

3413-
layout->addWidget(setup_hpsc_motor_widget(), row++, 0, 1, 3);
3413+
layout->addWidget(setup_hp_motor_widget(), row++, 0, 1, 3);
34143414

34153415
layout->setColumnStretch(2, 1);
34163416
layout->setRowStretch(row, 1);
34173417

34183418
return layout;
34193419
}
34203420

3421-
QWidget * main_window::setup_hpsc_motor_widget()
3421+
QWidget * main_window::setup_hp_motor_widget()
34223422
{
3423-
hpsc_motor_widget = new QWidget();
3423+
hp_motor_widget = new QWidget();
34243424
QGridLayout * layout = new QGridLayout();
34253425
layout->setContentsMargins(0, 0, 0, 0);
34263426

@@ -3434,65 +3434,65 @@ QWidget * main_window::setup_hpsc_motor_widget()
34343434
int row = 0;
34353435

34363436
{
3437-
hpsc_toff_value = new time_spin_box();
3438-
hpsc_toff_value->setObjectName("hpsc_toff_value");
3439-
hpsc_toff_value->setMinimumWidth(minimum_time_box_width);
3440-
hpsc_toff_value->set_decimals(1);
3437+
hp_toff_value = new time_spin_box();
3438+
hp_toff_value->setObjectName("hp_toff_value");
3439+
hp_toff_value->setMinimumWidth(minimum_time_box_width);
3440+
hp_toff_value->set_decimals(1);
34413441
QMap <int, int> mapping;
34423442
for (int i = 0; i < 0x100; i++) { mapping.insert(i, (i + 1) * 500); }
3443-
hpsc_toff_value->set_mapping(mapping);
3444-
hpsc_toff_value->setSuffix(" \u00b5s");
3445-
hpsc_toff_label = new QLabel();
3446-
hpsc_toff_label->setBuddy(hpsc_toff_value);
3447-
layout->addWidget(hpsc_toff_label, row, 0, FIELD_LABEL_ALIGNMENT);
3448-
layout->addWidget(hpsc_toff_value, row, 1, Qt::AlignLeft);
3443+
hp_toff_value->set_mapping(mapping);
3444+
hp_toff_value->setSuffix(" \u00b5s");
3445+
hp_toff_label = new QLabel();
3446+
hp_toff_label->setBuddy(hp_toff_value);
3447+
layout->addWidget(hp_toff_label, row, 0, FIELD_LABEL_ALIGNMENT);
3448+
layout->addWidget(hp_toff_value, row, 1, Qt::AlignLeft);
34493449
row++;
34503450
}
34513451

34523452
{
3453-
hpsc_tblank_value = new time_spin_box();
3454-
hpsc_tblank_value->setObjectName("hpsc_tblank_value");
3455-
hpsc_tblank_value->setMinimumWidth(minimum_time_box_width);
3456-
hpsc_tblank_value->set_decimals(2);
3453+
hp_tblank_value = new time_spin_box();
3454+
hp_tblank_value->setObjectName("hp_tblank_value");
3455+
hp_tblank_value->setMinimumWidth(minimum_time_box_width);
3456+
hp_tblank_value->set_decimals(2);
34573457
QMap<int, int> mapping;
34583458
for (int i = 0x32; i < 0x100; i++) { mapping.insert(i, i * 20); }
3459-
hpsc_tblank_value->set_mapping(mapping);
3460-
hpsc_tblank_value->setSuffix(" \u00b5s");
3461-
hpsc_tblank_label = new QLabel();
3462-
hpsc_tblank_label->setBuddy(hpsc_tblank_value);
3463-
layout->addWidget(hpsc_tblank_label, row, 0, FIELD_LABEL_ALIGNMENT);
3464-
layout->addWidget(hpsc_tblank_value, row, 1, Qt::AlignLeft);
3459+
hp_tblank_value->set_mapping(mapping);
3460+
hp_tblank_value->setSuffix(" \u00b5s");
3461+
hp_tblank_label = new QLabel();
3462+
hp_tblank_label->setBuddy(hp_tblank_value);
3463+
layout->addWidget(hp_tblank_label, row, 0, FIELD_LABEL_ALIGNMENT);
3464+
layout->addWidget(hp_tblank_value, row, 1, Qt::AlignLeft);
34653465
row++;
34663466
}
34673467

34683468
{
3469-
hpsc_abt_check = new QCheckBox();
3470-
hpsc_abt_check->setObjectName("hpsc_abt_check");
3471-
layout->addWidget(hpsc_abt_check, row, 0, 1, 2, Qt::AlignLeft);
3469+
hp_abt_check = new QCheckBox();
3470+
hp_abt_check->setObjectName("hp_abt_check");
3471+
layout->addWidget(hp_abt_check, row, 0, 1, 2, Qt::AlignLeft);
34723472
row++;
34733473
}
34743474

34753475
{
3476-
hpsc_tdecay_value = new time_spin_box();
3477-
hpsc_tdecay_value->setObjectName("hpsc_tdecay_value");
3478-
hpsc_tdecay_value->setMinimumWidth(minimum_time_box_width);
3479-
hpsc_tdecay_value->set_decimals(1);
3476+
hp_tdecay_value = new time_spin_box();
3477+
hp_tdecay_value->setObjectName("hp_tdecay_value");
3478+
hp_tdecay_value->setMinimumWidth(minimum_time_box_width);
3479+
hp_tdecay_value->set_decimals(1);
34803480
QMap<int, int> mapping;
34813481
for (int i = 0; i < 0x100; i++) { mapping.insert(i, i * 500); }
3482-
hpsc_tdecay_value->set_mapping(mapping);
3483-
hpsc_tdecay_value->setSuffix(" \u00b5s");
3484-
hpsc_tdecay_label = new QLabel();
3485-
hpsc_tdecay_label->setBuddy(hpsc_tdecay_value);
3486-
layout->addWidget(hpsc_tdecay_label, row, 0, FIELD_LABEL_ALIGNMENT);
3487-
layout->addWidget(hpsc_tdecay_value, row, 1, Qt::AlignLeft);
3482+
hp_tdecay_value->set_mapping(mapping);
3483+
hp_tdecay_value->setSuffix(" \u00b5s");
3484+
hp_tdecay_label = new QLabel();
3485+
hp_tdecay_label->setBuddy(hp_tdecay_value);
3486+
layout->addWidget(hp_tdecay_label, row, 0, FIELD_LABEL_ALIGNMENT);
3487+
layout->addWidget(hp_tdecay_value, row, 1, Qt::AlignLeft);
34883488
row++;
34893489
}
34903490

34913491
layout->setColumnStretch(2, 1);
34923492
layout->setRowStretch(row, 1);
34933493

3494-
hpsc_motor_widget->setLayout(layout);
3495-
return hpsc_motor_widget;
3494+
hp_motor_widget->setLayout(layout);
3495+
return hp_motor_widget;
34963496
}
34973497

34983498
QWidget * main_window::setup_motor_settings_box()
@@ -3970,10 +3970,10 @@ void main_window::retranslate()
39703970
agc_bottom_current_limit_label->setText(tr("AGC bottom current limit:"));
39713971
agc_current_boost_steps_label->setText(tr("AGC current boost steps:"));
39723972
agc_frequency_limit_label->setText(tr("AGC frequency limit:"));
3973-
hpsc_toff_label->setText(tr("Fixed off time:"));
3974-
hpsc_tblank_label->setText(tr("Current trip blanking time:"));
3975-
hpsc_abt_check->setText(tr("Enable adaptive blanking time"));
3976-
hpsc_tdecay_label->setText(tr("Mixed decay transition time:"));
3973+
hp_toff_label->setText(tr("Fixed off time:"));
3974+
hp_tblank_label->setText(tr("Current trip blanking time:"));
3975+
hp_abt_check->setText(tr("Enable adaptive blanking time"));
3976+
hp_tdecay_label->setText(tr("Mixed decay transition time:"));
39773977

39783978
//// advanced settings page
39793979

0 commit comments

Comments
 (0)