PowerState not initialized from actual power source — spurious backhaul on backup battery at first boot
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- cpp
- 領域
- embedded-iot
調査の方向性
begin() の74行目付近から開始し、破棄されている PowerAuto() の結果と PowerState メンバーを追跡します。次に Run() と turnOnSDcard() を調べ、最初のサイクルのバックホールゲートが検出された電源を使用していることを確認します。最初のログイベントより前に、バックアップまたは補助バッテリーでの起動を含め、PowerState が実際の電源を反映していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug
PowerState (a float member, initialized to 0) is only updated inside turnOnSDcard(), which is called from sleepNow(). Before the device sleeps for the first time, PowerState remains 0 regardless of actual power source.
The backhaul gate in Run() is:
if(LogCount >= LogCountPush && PowerState == 0) {
IO.DigitalWrite(FeatherEN, HIGH, MCP23018::Ports::B); // turn on Feather
PowerAuto() is called in begin() (line ~74) but its return value is discarded — PowerState is not updated there.
Failure scenario
Device starts on backup/aux battery (PowerAuto() would return 1 or 2). For the entire first duty cycle (before the first sleep), PowerState is still 0, so the backhaul guard evaluates true. The Feather fires on backup power, potentially browning out the radio and draining the backup supply prematurely.
Fix
Store PowerAuto() return value into PowerState at the end of begin(), so power state is known from the first log event onward.
Severity
Medium — affects first-boot behavior only; corrects itself after the first sleep/wake cycle.
🤖 Generated with Claude Code
- 主要言語
- C++
- スター
- 1
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NorthernWidget/Okapi_Library のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NorthernWidget/Okapi_Library の issue をすべて見る
似ている issue
-
ai_p1 comp-message-queues
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ClickHouse/ClickHouse#125890 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
redis/memtier_benchmark#642 ·
メンテナーはふだん 1 日以内に返信
-
Ctrl-C can abort a node: the state timer asks for the node names after shutdown対応中かも @fmrico が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fmrico/cascade_lifecycle#24 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100