parent
97acf15a41
commit
3152ae4d4a
|
@ -244,6 +244,7 @@ void processCanQcBenchTest(const CANRxFrame& frame) {
|
|||
if (command == bench_test_io_control_e::CAN_BENCH_GET_COUNT) {
|
||||
sendOutBoardMeta();
|
||||
} else if (command == bench_test_io_control_e::CAN_QC_OUTPUT_CONTROL_SET) {
|
||||
// see also "bench_setpin" console command
|
||||
qcDirectPinControlMode = true;
|
||||
setPin(frame, 1);
|
||||
} else if (command == bench_test_io_control_e::CAN_QC_OUTPUT_CONTROL_CLEAR) {
|
||||
|
|
|
@ -348,6 +348,7 @@ static void benchSetPinValue(const char *pinName, int bit) {
|
|||
if (pin == Gpio::Invalid) {
|
||||
return;
|
||||
}
|
||||
// low-level API which does not care about 'qcDirectPinControlMode'
|
||||
palWritePad(getHwPort("write", pin), getHwPin("write", pin), bit);
|
||||
efiPrintf("pin %s set value", hwPortname(pin));
|
||||
readPin(pinName);
|
||||
|
@ -813,6 +814,10 @@ void initSettings() {
|
|||
addConsoleActionS("bench_clearpin", benchClearPin);
|
||||
addConsoleActionS("bench_setpin", benchSetPin);
|
||||
addConsoleActionS("readpin", readPin);
|
||||
addConsoleAction("hw_qc_mode", [](){
|
||||
extern bool qcDirectPinControlMode;
|
||||
qcDirectPinControlMode = true;
|
||||
});
|
||||
|
||||
#if HAL_USE_ADC
|
||||
addConsoleAction("adc_report", printFullAdcReport);
|
||||
|
|
|
@ -578,9 +578,8 @@ void OutputPin::resetToggleStats() {
|
|||
}
|
||||
#endif // EFI_SIMULATOR
|
||||
|
||||
extern bool qcDirectPinControlMode;
|
||||
|
||||
void OutputPin::setValue(const char *msg, int logicValue, bool isForce) {
|
||||
extern bool qcDirectPinControlMode;
|
||||
UNUSED(msg);
|
||||
if ((qcDirectPinControlMode || getOutputOnTheBenchTest() == this) && !isForce) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue