Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: screens: diagnostics: add screen with bringup-relevant information #71

Merged
merged 6 commits into from
Aug 6, 2024

Conversation

hnez
Copy link
Member

@hnez hnez commented Jun 18, 2024

When bringup up a new LXA TAC we want to see a few things right away:

  • Is the screen straight inside the housing.
  • Are all versions (hardware and software) as expected.
  • Are the ADC channels calibrated.
  • Is the correct update channel activated.

This is easily done with a diagnostics screen. The screen is available via a special button sequence from the setup mode screen.

  • Why the setup mode screen?

    After bringing up a new TAC the setup mode will be active and should
    stay active until the devices arrives at the customer.
    This means the diagnostics mode should be reachable via the setup mode
    screen.

  • Why a special button sequence?

    The customer may try to skip the setup process using the buttons on
    the device (which is intentionally not possible).
    Why means they are likely to make quite a few random inputs.
    These should not activate the diagnostics mode as to not spook the user.

The screen looks something like this (the white border is used to align the screen):

(The image may appear blurry due to scaling applied by your browser)

@hnez
Copy link
Member Author

hnez commented Jun 18, 2024

@SmithChart I'll hand you the "Assignee" token first to verify if the screen contains everything we need (and can easily get to).
Please assign @KarlK90 once you consider your part of the review as done.

@hnez
Copy link
Member Author

hnez commented Jun 18, 2024

The failed cargo clippy run is due to an unrelated issue which is fixed by #70.
That PR should thus be merged first, so we can see the CI succeed.

@SmithChart
Copy link
Member

Thanks for the PR! I will give it a closer look later on.

One think that came to my mind: bb and pb are probably the timestamps from our factory data?
Could we have those timestamps in human readable?

Another interesting information there could be here:

root@lxatac-00013:/sys# cat firmware/devicetree/base/chosen/baseboard-factory-data/featureset ; echo 
base,tft,calibrated

It can either be calbrated or noCalibration.
I would like to have this flag here, too.

@hnez
Copy link
Member Author

hnez commented Jun 19, 2024

Thanks for the PR! I will give it a closer look later on.

One think that came to my mind: bb and pb are probably the timestamps from our factory data? Could we have those timestamps in human readable?

My first thought was "oh no! timezone handling!" but we already had the chrono crate as a dependency, so this turned out to be a rather simple change.

Another interesting information there could be here:

root@lxatac-00013:/sys# cat firmware/devicetree/base/chosen/baseboard-factory-data/featureset ; echo 
base,tft,calibrated

It can either be calbrated or noCalibration. I would like to have this flag here, too.

I actually did not know about these flags! I've added them to the screen now.
My EEPROM does'nt know about calibrated or noCalibration though (as seen in the updated screenshot) … the curse of working with prototype hardware that was brought up before we nailed down these flags ;).

@hnez
Copy link
Member Author

hnez commented Jun 19, 2024

The failed cargo check (1.68) run is due to me using a feature that was not stable yet in that rust version but is since 1.70.
The test against rust 1.68 is removed in #67, since we no longer need to build the tacd against this version.
That PR should thus be merged first, so we can see the CI succeed.

@SmithChart
Copy link
Member

Thanks for the PR! I will give it a closer look later on.
One think that came to my mind: bb and pb are probably the timestamps from our factory data? Could we have those timestamps in human readable?

My first thought was "oh no! timezone handling!" but we already had the chrono crate as a dependency, so this turned out to be a rather simple change.

Nice, thanks!

Another interesting information there could be here:

root@lxatac-00013:/sys# cat firmware/devicetree/base/chosen/baseboard-factory-data/featureset ; echo 
base,tft,calibrated

It can either be calbrated or noCalibration. I would like to have this flag here, too.

I actually did not know about these flags! I've added them to the screen now. My EEPROM does'nt know about calibrated or noCalibration though (as seen in the updated screenshot) … the curse of working with prototype hardware that was brought up before we nailed down these flags ;).

I've gave that a spin on my device:
content

With the flags on my device the powerboard features are cut off. Maybe give them an extra line?

Seeing this in reality: At least for me the font is a few point too small to comfortably read it. What about ditching the analog calibration and in turn raise the font size a bit?

@hnez hnez force-pushed the diagnostics-screen branch 3 times, most recently from df3cf32 to 98d4ae9 Compare July 1, 2024 09:00
@hnez
Copy link
Member Author

hnez commented Jul 1, 2024

With the flags on my device the powerboard features are cut off. Maybe give them an extra line?

Seeing this in reality: At least for me the font is a few point too small to comfortably read it. What about ditching the analog calibration and in turn raise the font size a bit?

I've increased the font size from FONT_5X7 to FONT_6X10 now. That makes the text a lot more readable.

To do so I've removed the raw ADC value outputs for each channel.

See the updated screenshot in the PR description for reference.

@SmithChart
Copy link
Member

FONT_6x10 is a lot more comfortable to read. That update looks good to me.

One detail: when leaving the diagnostics screen, the tacd -controlled LEDs stay on, when they have been enabled during diagnostics. But I do not think that we need to change this behavior.

LGTM from my side. Passing the ball to @KarlK90 for the code review.

@hnez hnez assigned KarlK90 and unassigned SmithChart Jul 26, 2024
@hnez
Copy link
Member Author

hnez commented Jul 26, 2024

Hi @KarlK90, could you have a look at this PR? I would like to have it in an upcoming release, so we have it available when bringing up the next batch of TACs.

This adds support to read the featurset fields stored in the baseboard and
powerboard EEPROMs which are passed to us by barebox via the devicetree
choosen mechanism.

The featuresets describe things like "does this TAC have a TFT"
(in contrast to the OLEDs the first generation of TACs had)
or "are these scales and offsets actually calibrated or only
calculated".

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
When bringup up a new LXA TAC we want to see a few things right away:

  - Is the screen straight inside the housing.
  - Are all versions (hardware and software) as expected.
  - Are the ADC channels calibrated.
  - Is the correct update channel activated.

This is easily done with a diagnostics screen.
The screen is available via a special button sequence from the setup mode
screen.

  - Why the setup mode screen?

    After bringing up a new TAC the setup mode will be active and should
    stay active until the devices arrives at the customer.
    This means the diagnostics mode should be reachable via the setup mode
    screen.

  - Why a special button sequence?

    The customer may try to skip the setup process using the buttons on
    the device (which is intentionally not possible).
    Why means they are likely to make quite a few random inputs.
    These should not activate the diagnostics mode as to not spook the user.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Things like hardware and software versions.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Let the user turn the tacd-controlled LEDs on and off via the diagnostics
screen. Also dimm the backlight to make sure that works.
This allows verifying the successful operation of these LEDs without
requiring an involved test setup.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Copy link
Member

@KarlK90 KarlK90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hnez hnez merged commit 37a4e34 into linux-automation:main Aug 6, 2024
11 checks passed
@hnez hnez deleted the diagnostics-screen branch August 6, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants