Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Power diagnostic on the LED grid at start-up: LiPo, solar, alkaline

Đang mở
#9 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
arduino, cpp
Lĩnh vực
embedded-iot

Hướng nghiên cứu

Start with Okapi.cpp:397 to determine which voltage reading corresponds to the LiPo, then read readOnBoard() and powerAuto() for the existing power measurements and rail selection. Review NW-Status/studies/okapi-leds/ and the Okapi section of NW-Status/QUEUE.md for the design context. Done means the three sources show the specified levels for three seconds at startup, with charging and USB-only cases handled, messages raised as needed, and the LED driver asleep between displays.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Show the state of Okapi's three power sources on the LED grid at start-up, even when none is in a warning zone, so that the installer knows the overall picture before walking away. This is the one deliberate exception to "dark means fine" on the grid, for the same reason the READY chirp exists: the person is standing there, and the question after "is it logging" is "how are the batteries".

The grid as it is laid out (Project-Okapi/Hardware/Okapi.brd, board held USB-C down):

A B C
row 3 red – green
row 2 yellow green yellow
row 1 green yellow red

With fixed cell colours a column is a three-level gauge: one cell lit at the level.

Proposed display, for the three-second window at start-up, then dark:

Column Source Lit cell
A rechargeable (LiPo) A1 green good, A2 yellow middling, A3 red low or absent
B solar B2 green charging, B1 yellow no charge current
C alkaline primary C3 green good, C2 yellow middling, C1 red low or absent

The status RGB LED keeps Margay's patterns unchanged; the grid shows only what Okapi has and Margay does not.

What must exist first, in order. Today readOnBoard() logs VBeta, VPrime, ISolar and IBeta, and powerAuto() tells which rail came up; nothing raises a message.

  1. Decide which of VBeta and VPrime is the LiPo (the open comment at Okapi.cpp:397).
  2. A LiPo voltage-to-level curve. Margay's alkaline fit does not apply.
  3. Two band thresholds per chemistry, in Page 1's battery block (Blocks 0–1 are provisioned for this).
  4. A definition of "charging": ISolar above a floor, or the LT3652's !CHRG line, which reaches the I/O expander at GPA3 and is never read. Check what ADS1115 channel 1 measures, since V_SOLAR_SENSE goes to the PAC1934.
  5. The USB-only discriminator, so a benched board with no pack fitted does not show red (the four bench readings in NW-Status/QUEUE.md).
  6. Messages: BATTERY_LOW exists and is raised nowhere; add the backup-in-use message from _powerState.
  7. The PCA9634 driver: wake, LEDOUT, sleep, with pin 0 reclaimed from the stale ADC_Sense_SW define. Awake it draws 2.5 mA against an 80 µA sleep budget, so it sleeps between displays.

Hardware, while the boards are not yet made (Project-Okapi): label the columns on the silk (LiPo, SOLAR, AA) and mark column C's direction, or fit column C's LEDs the same way up as A. The current labels sit on the documentation layer, not the silkscreen.

Design notes and the studies behind them: NW-Status/studies/okapi-leds/ and the "Okapi's grid carries what Okapi has and Margay lacks" section of NW-Status/QUEUE.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BazaY6meA6yMRDeuUsv1Wd

Ngôn ngữ chính
C++
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NorthernWidget/Okapi_Library

Tất cả issue của NorthernWidget/Okapi_Library

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.