Skip to content

Commit a55215d

Browse files
committed
mio168 channels calibration
1 parent 2ade905 commit a55215d

32 files changed

+54719
-54216
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ source_group("eez\\modules\\psu" FILES ${src_eez_modules_psu} ${header_eez_modul
196196

197197
set(src_eez_modules_psu_gui
198198
src/eez/modules/psu/gui/animations.cpp
199+
src/eez/modules/psu/gui/channel_calibration.cpp
199200
src/eez/modules/psu/gui/data.cpp
200201
src/eez/modules/psu/gui/edit_mode.cpp
201202
src/eez/modules/psu/gui/file_manager.cpp
@@ -212,6 +213,7 @@ set(src_eez_modules_psu_gui
212213
list (APPEND src_files ${src_eez_modules_psu_gui})
213214
set(header_eez_modules_psu_gui
214215
src/eez/modules/psu/gui/animations.h
216+
src/eez/modules/psu/gui/channel_calibration.h
215217
src/eez/modules/psu/gui/data.h
216218
src/eez/modules/psu/gui/edit_mode.h
217219
src/eez/modules/psu/gui/file_manager.h

modular-psu-firmware.eez-project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15622,7 +15622,7 @@
1562215622
{
1562315623
"type": "DisplayData",
1562415624
"style": {
15625-
"inheritFrom": "encoder_cursor_17_enabled"
15625+
"inheritFrom": "edit_value_M_centered"
1562615626
},
1562715627
"data": "calibration_point_set_value",
1562815628
"action": "",
@@ -15647,7 +15647,7 @@
1564715647
{
1564815648
"type": "DisplayData",
1564915649
"style": {
15650-
"inheritFrom": "encoder_cursor_17_enabled"
15650+
"inheritFrom": "edit_value_M_centered"
1565115651
},
1565215652
"data": "calibration_point_measured_value",
1565315653
"action": "",

src/eez/action_impl.cpp

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,6 @@ void action_show_ch_settings_info() {
373373
pushPage(PAGE_ID_CH_SETTINGS_INFO);
374374
}
375375

376-
void action_show_ch_settings_cal() {
377-
pushPage(PAGE_ID_CH_SETTINGS_CALIBRATION);
378-
}
379-
380376
void action_edit_calibration_password() {
381377
editCalibrationPassword();
382378
}
@@ -405,10 +401,6 @@ void action_ch_settings_copy() {
405401
pushSelectFromEnumPage(channelsEnumDefinition, -1, nullptr, onChannelCopyDestinationSelected, false, false);
406402
}
407403

408-
void action_ch_settings_calibration_start_calibration() {
409-
ChSettingsCalibrationEditPage::start();
410-
}
411-
412404
void action_ch_settings_calibration_toggle_enable() {
413405
if (g_channel) {
414406
g_channel->calibrationEnable(!g_channel->isCalibrationEnabled());
@@ -419,72 +411,6 @@ void action_ch_settings_calibration_toggle_enable() {
419411
}
420412
}
421413

422-
void action_ch_settings_calibration_view_points() {
423-
ChSettingsCalibrationViewPage::start();
424-
}
425-
426-
void onSetChannelCalibrationValueType(uint16_t value) {
427-
popPage();
428-
429-
auto editPage = (ChSettingsCalibrationEditPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_EDIT);
430-
if (editPage) {
431-
editPage->setCalibrationValueType((CalibrationValueType)value);
432-
} else {
433-
auto viewPage = (ChSettingsCalibrationViewPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_VIEW);
434-
if (viewPage) {
435-
viewPage->setCalibrationValueType((CalibrationValueType)value);
436-
}
437-
}
438-
}
439-
440-
void action_select_channel_calibration_value_type() {
441-
if (calibration::hasSupportForCurrentDualRange()) {
442-
pushSelectFromEnumPage(ENUM_DEFINITION_CALIBRATION_VALUE_TYPE_DUAL_RANGE, calibration::getCalibrationValueType(), nullptr, onSetChannelCalibrationValueType);
443-
} else {
444-
pushSelectFromEnumPage(ENUM_DEFINITION_CALIBRATION_VALUE_TYPE, calibration::getCalibrationValueType(), nullptr, onSetChannelCalibrationValueType);
445-
}
446-
}
447-
448-
void action_channel_calibration_point_previous() {
449-
auto editPage = (ChSettingsCalibrationEditPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_EDIT);
450-
if (editPage) {
451-
editPage->moveToPreviousPoint();
452-
} else {
453-
auto viewPage = (ChSettingsCalibrationViewPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_VIEW);
454-
viewPage->moveToPreviousPoint();
455-
}
456-
}
457-
458-
void action_channel_calibration_point_next() {
459-
auto editPage = (ChSettingsCalibrationEditPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_EDIT);
460-
if (editPage) {
461-
editPage->moveToNextPoint();
462-
} else {
463-
auto viewPage = (ChSettingsCalibrationViewPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_VIEW);
464-
viewPage->moveToNextPoint();
465-
}
466-
}
467-
468-
void action_channel_calibration_point_save() {
469-
auto page = (ChSettingsCalibrationEditPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_EDIT);
470-
page->savePoint();
471-
}
472-
473-
void action_channel_calibration_point_delete() {
474-
auto page = (ChSettingsCalibrationEditPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_EDIT);
475-
page->deletePoint();
476-
}
477-
478-
void action_channel_calibration_chart_zoom() {
479-
auto editPage = (ChSettingsCalibrationEditPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_EDIT);
480-
if (editPage) {
481-
editPage->zoomChart();
482-
} else {
483-
auto viewPage = (ChSettingsCalibrationViewPage *)getPage(PAGE_ID_CH_SETTINGS_CALIBRATION_VIEW);
484-
viewPage->zoomChart();
485-
}
486-
}
487-
488414
void action_ch_settings_prot_clear() {
489415
ChSettingsProtectionPage::clear();
490416
}

0 commit comments

Comments
 (0)