# The revision in the field

More than one hardware revision can share one tree. Context is the revision you ship.

[Book a demo](https://byteask.cal.com/pratyush/book-a-demo) [See the evidence](https://byteask.ai/industries/industrial#evidence)

## The build gives the context

ByteAsk Context indexes the functions and calls your compile commands select. The examples below show what was captured for this domain.

Failing run

test_frontpanel failed. 6 other programs were not built

Passing run

test_frontpanel, test_encoder_qei, and test_knob passed. 4 other programs were not built

Revs named

Rev C for the verify. Rev B for the bench, encoder, and key tests. That rev B result is not in the excerpt

frontpanel FP-251, recorded 2026-10-26. The two counts are two runs, not one.

[How ByteAsk Context works](https://byteask.ai/context)

## A test catches the reversed knob

Clockwise clicks dropped the volume. First run: one program failed, 6 not built. After the fix: three programs passed, 4 not built.

The tests the change touches. The counts are two runs.

```
TESTS FAILED: built test_frontpanel (0 s), ran 1 test(s) (0 s)
tests/test_frontpanel.c:39: CHECK_EQ(volume_get(), 23) failed: 17 != 23
PASS: built test_frontpanel, test_encoder_qei, test_knob (0 s), ran 3 test(s) (0 s)
100% tests passed, 0 tests failed out of 3
not built: 4 other test program(s); none of them uses the code you changed
+    /* Keep raw timer counts: encoder_detents() applies cfg->reverse for both drivers. */
+    hal_tim_encoder_init(cfg->tim, 0xFFFF, false);
```

Recorded 2026-10-26.

Read the full captured excerpt

```
I’ll run `context_verify` now to confirm the new bench tests reproduce FP-251 before applying the fix.
TESTS FAILED: built test_frontpanel (0 s), ran 1 test(s) (0 s)
0% tests passed, 1 tests failed out of 1
tests/test_frontpanel.c:39: CHECK_EQ(volume_get(), 23) failed: 17 != 23
tests/test_frontpanel.c:54: CHECK_EQ(freq_get(), 1000 + (i + 1) * 100) failed: 900 != 1100
not built: 6 other test program(s); none of them uses the code you changed
The new test reproduced the reported result exactly: three clockwise clicks changed volume from 20 to 17. The fix is in place; I’ll use `context_verify` for rev C and `cpp_test_select` to run the bench, encoder, and key tests in the rev B build.
PASS: built test_frontpanel, test_encoder_qei, test_knob (0 s), ran 3 test(s) (0 s)
100% tests passed, 0 tests failed out of 3
not built: 4 other test program(s); none of them uses the code you changed
diff --git a/drivers/encoder/encoder_qei.c b/drivers/encoder/encoder_qei.c
-    /* Reverse in hardware: inverting TI1 flips the count direction at no cost. */
-    hal_tim_encoder_init(cfg->tim, 0xFFFF, cfg->reverse);
+    /* Keep raw timer counts: encoder_detents() applies cfg->reverse for both drivers. */
+    hal_tim_encoder_init(cfg->tim, 0xFFFF, false);
```

## The source behind the answer

SunSpec Modbus IEEE 1547-2018 Profile Specification and Implementation Guide
§2.10 Voltage Trip · pp.17–18

| Setting | SunSpec Modbus point |
| --- | --- |
| UV2 Voltage | 707.MustTrip.Crv.Pt[2].V |
| UV2 Clearing Time | 707.MustTrip.Crv.Pt[2].Tms |
| OV2 Voltage | 708.MustTrip.Crv.Pt[2].V |
| OV2 Clearing Time | 708.MustTrip.Crv.Pt[2].Tms |

Retrieved with `search_docs` on 2026-10-26. This document lookup is separate from the recorded session above.

## On your build

[Book a demo](https://byteask.cal.com/pratyush/book-a-demo)

[On-prem and air-gapped](https://byteask.ai/enterprise)

---
HTML version: https://byteask.ai/industries/industrial
