private void InstanceOnSelfTestResponse(object?sender, SelfTestParser e) { _hwVer.Description = strfy(e.HardwareVersion); _swVer.Description = strfy(e.SoftwareVersion); _touchFwVer.Description = strfy(e.TouchFirmwareVersion); _btAddr.Description = $"{Left}: {strfy(e.LeftBluetoothAddress)}, {Right}: {strfy(e.RightBluetoothAddress)}"; _proximity.Description = $"{Left}: {strfy(e.LeftProximity)}, {Right}: {strfy(e.RightProximity)}"; _thermo.Description = $"{Left}: {strfy(e.LeftThermistor)}, {Right}: {strfy(e.RightThermistor)}"; _adcSoc.Description = $"{Left}: {strfy(e.LeftAdcSOC)}, {Right}: {strfy(e.RightAdcSOC)}"; _adcVoltage.Description = $"{Left}: {strfy(e.LeftAdcVCell)}, {Right}: {strfy(e.RightAdcVCell)}"; _adcCurrent.Description = $"{Left}: {strfy(e.LeftAdcCurrent)}, {Right}: {strfy(e.RightAdcCurrent)}"; _hall.Description = $"{Left}: {strfy(e.LeftHall)}, {Right}: {strfy(e.RightHall)}"; _accel.Description = $"{Left}: {strfy(e.AllLeftAccelerator)}, {Right}: {strfy(e.AllRightAccelerator)}"; _result.Text = e.AllChecks ? Loc.Resolve("selftest_pass_long") : Loc.Resolve("selftest_fail_long"); _pageHeader.LoadingSpinnerVisible = false; }
private void InstanceOnSelfTestResponse(object sender, SelfTestParser e) { Dispatcher.Invoke(() => { LoadingSpinner.Visibility = Visibility.Hidden; LoadingSpinner.Stop(); HwVer.TextDetail = strfy(e.HardwareVersion); SwVer.TextDetail = strfy(e.SoftwareVersion); TouchFwVer.TextDetail = strfy(e.TouchFirmwareVersion); BtAddr.TextDetail = $"Left: {strfy(e.LeftBluetoothAddress)}, Right: {strfy(e.RightBluetoothAddress)}"; Proximity.TextDetail = $"Left: {strfy(e.LeftProximity)}, Right: {strfy(e.RightProximity)}"; Thermo.TextDetail = $"Left: {strfy(e.LeftThermistor)}, Right: {strfy(e.RightThermistor)}"; AdcSoc.TextDetail = $"Left: {strfy(e.LeftAdcSOC)}, Right: {strfy(e.RightAdcSOC)}"; AdcVoltage.TextDetail = $"Left: {strfy(e.LeftAdcVCell)}, Right: {strfy(e.RightAdcVCell)}"; AdcCurrent.TextDetail = $"Left: {strfy(e.LeftAdcCurrent)}, Right: {strfy(e.RightAdcCurrent)}"; Hall.TextDetail = $"Left: {strfy(e.LeftHall)}, Right: {strfy(e.RightHall)}"; Accelerator.TextDetail = $"Left: {strfy(e.AllLeftAccelerator)}, Right: {strfy(e.AllRightAccelerator)}"; SelfTestResult.Text = e.AllChecks ? "All checks have passed" : "One or more checks have failed"; }); }