Compare commits

...

4 Commits

Author SHA1 Message Date
Gokul
320e71784d
Merge 38ee755033 into 78d6e5931c 2026-02-03 22:10:05 +00:00
Jake Kenneally
78d6e5931c
fix: Correct debugging_monitor.py script instructions (#676)
Some checks are pending
CI / build (push) Waiting to run
## Summary

**What is the goal of this PR?**
- Minor correction to the `debugging_monitor.py` script instructions

**What changes are included?**
- `pyserial` should be installed, NOT `serial`, which is a [different
lib](https://pypi.org/project/serial/)
- Added macOS serial port

## Additional Context

- Just a minor docs update. I can confirm the debugging script is
working great on macOS

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**< NO >**_
2026-02-04 00:33:20 +03:00
Luke Stein
dac11c3fdd
fix: Correct instruction text to match actual button text (#672)
## Summary

* Instruction text says "Press OK to scan again" but button label is
actually "Connect" (not OK)
* Corrects instruction text

---

### AI Usage

Did you use AI tools to help write this code? **No**
2026-02-04 00:32:52 +03:00
gokulp01
38ee755033 double shift to caps 2026-01-31 11:26:33 -06:00
4 changed files with 35 additions and 6 deletions

View File

@ -102,13 +102,18 @@ After flashing the new features, its recommended to capture detailed logs fro
First, make sure all required Python packages are installed: First, make sure all required Python packages are installed:
```python ```python
python3 -m pip install serial colorama matplotlib python3 -m pip install pyserial colorama matplotlib
``` ```
after that run the script: after that run the script:
```sh ```sh
# For Linux
# This was tested on Debian and should work on most Linux systems.
python3 scripts/debugging_monitor.py python3 scripts/debugging_monitor.py
# For macOS
python3 scripts/debugging_monitor.py /dev/cu.usbmodem2101
``` ```
This was tested on Debian and should work on most Linux systems. Minor adjustments may be required for Windows or macOS. Minor adjustments may be required for Windows.
## Internals ## Internals

View File

@ -520,7 +520,7 @@ void WifiSelectionActivity::renderNetworkList() const {
const auto height = renderer.getLineHeight(UI_10_FONT_ID); const auto height = renderer.getLineHeight(UI_10_FONT_ID);
const auto top = (pageHeight - height) / 2; const auto top = (pageHeight - height) / 2;
renderer.drawCenteredText(UI_10_FONT_ID, top, "No networks found"); renderer.drawCenteredText(UI_10_FONT_ID, top, "No networks found");
renderer.drawCenteredText(SMALL_FONT_ID, top + height + 10, "Press OK to scan again"); renderer.drawCenteredText(SMALL_FONT_ID, top + height + 10, "Press Connect to scan again");
} else { } else {
// Calculate how many networks we can display // Calculate how many networks we can display
constexpr int startY = 60; constexpr int startY = 60;

View File

@ -92,8 +92,26 @@ void KeyboardEntryActivity::handleKeyPress() {
// Handle special row (bottom row with shift, space, backspace, done) // Handle special row (bottom row with shift, space, backspace, done)
if (selectedRow == SPECIAL_ROW) { if (selectedRow == SPECIAL_ROW) {
if (selectedCol >= SHIFT_COL && selectedCol < SPACE_COL) { if (selectedCol >= SHIFT_COL && selectedCol < SPACE_COL) {
// Shift toggle // Shift toggle (double-tap enables caps lock)
const unsigned long now = millis();
const bool isDoubleTap = (lastShiftTapMs != 0) && ((now - lastShiftTapMs) <= SHIFT_DOUBLE_TAP_MS);
if (capsLockActive) {
capsLockActive = false;
shiftActive = false;
lastShiftTapMs = 0;
return;
}
if (isDoubleTap) {
capsLockActive = true;
shiftActive = true;
lastShiftTapMs = 0;
return;
}
shiftActive = !shiftActive; shiftActive = !shiftActive;
lastShiftTapMs = now;
return; return;
} }
@ -131,8 +149,9 @@ void KeyboardEntryActivity::handleKeyPress() {
if (maxLength == 0 || text.length() < maxLength) { if (maxLength == 0 || text.length() < maxLength) {
text += c; text += c;
// Auto-disable shift after typing a letter // Auto-disable shift after typing a letter
if (shiftActive && ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))) { if (shiftActive && !capsLockActive && ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))) {
shiftActive = false; shiftActive = false;
lastShiftTapMs = 0;
} }
} }
} }
@ -318,7 +337,8 @@ void KeyboardEntryActivity::render() const {
// SHIFT key (logical col 0, spans 2 key widths) // SHIFT key (logical col 0, spans 2 key widths)
const bool shiftSelected = (selectedRow == 4 && selectedCol >= SHIFT_COL && selectedCol < SPACE_COL); const bool shiftSelected = (selectedRow == 4 && selectedCol >= SHIFT_COL && selectedCol < SPACE_COL);
renderItemWithSelector(currentX + 2, rowY, shiftActive ? "SHIFT" : "shift", shiftSelected); const char* shiftLabel = capsLockActive ? "CAPS" : (shiftActive ? "SHIFT" : "shift");
renderItemWithSelector(currentX + 2, rowY, shiftLabel, shiftSelected);
currentX += 2 * (keyWidth + keySpacing); currentX += 2 * (keyWidth + keySpacing);
// Space bar (logical cols 2-6, spans 5 key widths) // Space bar (logical cols 2-6, spans 5 key widths)

View File

@ -71,6 +71,10 @@ class KeyboardEntryActivity : public Activity {
int selectedRow = 0; int selectedRow = 0;
int selectedCol = 0; int selectedCol = 0;
bool shiftActive = false; bool shiftActive = false;
bool capsLockActive = false;
unsigned long lastShiftTapMs = 0;
static constexpr unsigned long SHIFT_DOUBLE_TAP_MS = 500;
// Callbacks // Callbacks
OnCompleteCallback onComplete; OnCompleteCallback onComplete;