MCPcopy Create free account

hub / github.com/HermannBjorgvin/Clawdmeter / functions

Functions503 in github.com/HermannBjorgvin/Clawdmeter

↓ 34 callersFunctionlog
(msg: str)
daemon/claude_usage_daemon.py:57
↓ 28 callersFunctiones8311_write_reg
firmware/src/es8311.c:146
↓ 22 callersFunctionlog
(msg: str)
daemon/claude_usage_daemon_windows.py:96
↓ 19 callersFunction_run
Run a coroutine synchronously for synchronous test functions.
daemon/tests/test_windows_reconnect.py:29
↓ 17 callersFunctionpoll_api
(token: str)
daemon/claude_usage_daemon_windows.py:186
↓ 16 callersFunction_run
Run a coroutine synchronously for synchronous test functions.
daemon/tests/test_windows_poll.py:35
↓ 15 callersFunction_make_mock_response
Build a mock httpx.Response-like object with controllable headers.
daemon/tests/test_windows_poll.py:23
↓ 14 callersFunction_make_device
Build a minimal fake BLEDevice.
daemon/tests/test_windows_reconnect.py:34
↓ 13 callersMethodchoose
Update state from this cycle's {dir: session_pct} and return the active dir.
daemon/claude_usage_daemon.py:486
↓ 13 callersFunctionconnect_and_run
Connect to device and poll until disconnected or stopped. Returns True if at least one successful write occurred. `device` is a BLEDevice —
daemon/claude_usage_daemon_windows.py:511
↓ 12 callersFunction_make_event
(set_)
daemon/tests/test_windows_reconnect.py:41
↓ 12 callersFunctionimg_bytes
(img)
daemon/tests/test_windows_icon.py:96
↓ 10 callersFunctiones8311_read_reg
firmware/src/es8311.c:153
↓ 8 callersFunctionhdr
(name: str, default: str = "0")
daemon/claude_usage_daemon.py:389
↓ 8 callersFunctionhdr
(name: str, default: str = "0")
daemon/claude_usage_daemon_windows.py:206
↓ 8 callersFunctionread_token
Read the Claude OAuth access token from the first available credential file.
daemon/claude_usage_daemon_windows.py:455
↓ 7 callersFunction_expand565
Expand a 16-bit RGB565 value to an (R, G, B) tuple using proper rounding. Uses ``(channel * 255 + max // 2) // max`` per channel, NOT a *8 bit-sh
daemon/icon_assets.py:36
↓ 7 callersFunction_run
(coro)
daemon/tests/test_macos_multidir.py:16
↓ 6 callersFunction_mac_from_pnp_instance_id
Recover a canonical BLE MAC ("AA:BB:CC:DD:EE:FF") from a PnP instance id. Windows encodes a paired BLE device's address in its PnP instance id as
daemon/claude_usage_daemon_windows.py:280
↓ 6 callersFunction_make_winreg_mock
Return a configured MagicMock that stands in for the winreg module.
daemon/tests/test_windows_autostart.py:22
↓ 6 callersFunctionheader_text
Return the D-05 menu status-header string for the current TrayState. Shapes: "Connected · last update HH:MM" (ts.last_sync is a float)
daemon/tray_windows.py:90
↓ 6 callersFunctioninit_icon_dsc_rgb565a8
firmware/src/ui.cpp:258
↓ 6 callersFunctionload_logo_rgba
Parse the firmware logo.h C header and return an 80x80 Pillow RGBA Image. The logo.h layout (RGB565A8 planar, little-endian RGB565): - Firs
daemon/icon_assets.py:57
↓ 6 callersMethodset_error
Called on token-expired / API auth failure (D-01 Error = actionable only).
daemon/tray_windows.py:80
↓ 5 callersFunction_acquire_single_instance
Acquire the process-wide single-instance lock. Returns a truthy handle to keep alive for the process lifetime if this is the first/only tray,
daemon/tray_windows.py:123
↓ 5 callersFunction_extract_access_token
Pull the accessToken out of a credentials blob. Claude Code stores credentials as a JSON object; the blob may also be nested ({"claudeAiOauth
daemon/claude_usage_daemon_windows.py:395
↓ 5 callersFunctionread_token_for
Read the OAuth token for one config dir. Linux: each dir keeps its own ``<dir>/.credentials.json``. macOS: the default install stores the tok
daemon/claude_usage_daemon.py:143
↓ 5 callersMethodset_scanning
Called in scan/reconnect branches. BLE churn stays Scanning (D-01).
daemon/tray_windows.py:75
↓ 5 callersFunctionstate_icon
Composite a colored corner bubble onto the brand mark for the given state. Args: base: The RGBA brand image (as returned by ``load_logo_
daemon/icon_assets.py:107
↓ 5 callersFunctionui_show_screen
firmware/src/ui.cpp:647
↓ 4 callersFunction_make_zombie_client
Build a mock BleakClient that connects successfully but has is_connected stuck True.
daemon/tests/test_windows_reconnect.py:162
↓ 4 callersFunctionapply_brightness
firmware/src/idle.cpp:22
↓ 4 callersFunctionbegin_fade
firmware/src/idle.cpp:26
↓ 4 callersFunctionidle_consume_wake_press
firmware/src/idle.cpp:56
↓ 4 callersFunctionread_config_dirs
Claude config dirs to poll, from the `config_dirs` option (comma list). Defaults to [~/.claude] so existing single-plan setups are unchanged. ~ i
daemon/claude_usage_daemon.py:119
↓ 4 callersFunctionrender_frame
firmware/src/splash.cpp:76
↓ 4 callersFunctionwrite_reg
firmware/src/boards/waveshare_amoled_18_c6/io_expander.cpp:22
↓ 4 callersFunctionwrite_reg
firmware/src/boards/waveshare_amoled_18/io_expander.cpp:20
↓ 3 callersFunction_assert_clean
Assert that none of the FORBIDDEN patterns appear in the given source file. Reads the file relative to the repository root (the cwd pytest is inv
daemon/tests/test_windows_no_wsl.py:41
↓ 3 callersFunction_fake_kernel32
Build a fake ctypes module tree whose CreateMutexW returns `handle` and whose get_last_error() returns `last_error`.
daemon/tests/test_windows_tray.py:231
↓ 3 callersFunction_process_state_change
Mirror the relevant part of the _refresh loop body.
daemon/tests/test_windows_tray.py:195
↓ 3 callersFunction_wait_first
Return when any of `events` is set, or after `timeout` seconds. Lets the poll loop's TICK wait wake immediately on a stop signal (clean, resp
daemon/claude_usage_daemon_windows.py:494
↓ 3 callersFunctionacquire_target
Return a connectable handle for the Clawdmeter, or None. Targets only the device bonded to THIS machine (via the PnP table / CLAWDMETER_BLE_A
daemon/claude_usage_daemon_windows.py:337
↓ 3 callersFunctionfetchText
(url)
tools/scrape_claudepix.js:25
↓ 3 callersFunctionpct
(util: str)
daemon/claude_usage_daemon.py:402
↓ 3 callersFunctionpct
(util: str)
daemon/claude_usage_daemon_windows.py:219
↓ 3 callersFunctionreset_minutes
(reset_ts: str)
daemon/claude_usage_daemon.py:394
↓ 3 callersFunctionreset_minutes
(reset_ts: str)
daemon/claude_usage_daemon_windows.py:211
↓ 3 callersMethodset_connected
Called after write_payload returns True. ts = time.time().
daemon/tray_windows.py:69
↓ 3 callersFunctionsplash_pick_for_current_rate
firmware/src/splash.cpp:258
↓ 3 callersFunctionusage_rate_group
firmware/src/usage_rate.cpp:61
↓ 3 callersMethodwrite_payload
(self, payload: dict)
daemon/claude_usage_daemon.py:554
↓ 2 callersFunction_blueutil
Run `blueutil <args>`, returning stdout, or None on failure/timeout. A timeout almost always means blueutil lacks Bluetooth permission (it bl
daemon/claude_usage_daemon.py:583
↓ 2 callersFunction_connected_mock_client
()
daemon/tests/test_windows_reconnect.py:675
↓ 2 callersFunction_extract_access_token
Pull the accessToken out of a credentials blob. Claude Code stores credentials as a JSON object; the blob may also be nested ({"claudeAiOauth
daemon/claude_usage_daemon.py:61
↓ 2 callersFunction_next_backoff
D-05: double current backoff value, clamped to cap. Pure helper — unit-testable without driving the main loop. Used by both slow-search (cap=
daemon/claude_usage_daemon_windows.py:628
↓ 2 callersFunction_ok
(p)
daemon/claude_usage_daemon.py:241
↓ 2 callersFunction_read_expiry
Return human-readable expiry from the first-hit credentials file. Reads claudeAiOauth.expiresAt (epoch milliseconds — JS convention). Divides
daemon/claude_usage_daemon_windows.py:465
↓ 2 callersFunction_run
(coro)
daemon/tests/test_windows_bonded.py:26
↓ 2 callersFunction_windows_credential_candidates
Return the ordered list of credential file paths to probe (first hit wins). Priority: 1. CLAUDE_CREDENTIALS_PATH env override (D-03, project-
daemon/claude_usage_daemon_windows.py:430
↓ 2 callersFunction_wrap
(p)
daemon/claude_usage_daemon.py:236
↓ 2 callersFunctionapply_battery_visibility
firmware/src/ui.cpp:635
↓ 2 callersFunctionble_get_device_name
firmware/src/ble.cpp:330
↓ 2 callersFunctionble_get_mac_address
firmware/src/ble.cpp:334
↓ 2 callersFunctionble_get_state
firmware/src/ble.cpp:326
↓ 2 callersFunctionble_keyboard_press
firmware/src/ble.cpp:384
↓ 2 callersFunctionble_keyboard_release
firmware/src/ble.cpp:392
↓ 2 callersFunctionboard_rev
firmware/src/boards/waveshare_amoled_18/board_init.cpp:12
↓ 2 callersFunctionbuild_state_icons
Build all three connection-state icons from the brand base image. Build them once at startup; swap ``icon.icon = icons[state]`` in the tray l
daemon/icon_assets.py:139
↓ 2 callersFunctionchime_init
firmware/src/chime.cpp:40
↓ 2 callersFunctionchime_play
firmware/src/chime.cpp:59
↓ 2 callersFunctionchime_tick
firmware/src/chime.cpp:66
↓ 2 callersFunctionclaim_owner
firmware/src/ble.cpp:132
↓ 2 callersFunctiondisplay_hal_set_brightness
firmware/src/boards/waveshare_amoled_216/display.cpp:36
↓ 2 callersFunctiones8311_resolution_config
firmware/src/es8311.c:261
↓ 2 callersFunctiones8311_sample_frequency_config
firmware/src/es8311.c:174
↓ 2 callersFunctionformat_reset_time
firmware/src/ui.cpp:211
↓ 2 callersFunctiongo
()
daemon/tests/test_windows_reconnect.py:651
↓ 2 callersFunctionidle_is_asleep
firmware/src/idle.cpp:74
↓ 2 callersFunctionidle_set_awake_brightness
firmware/src/idle.cpp:39
↓ 2 callersFunctionimu_hal_rotation_quadrant
firmware/src/boards/waveshare_amoled_216/imu.cpp:66
↓ 2 callersFunctioninput_hal_is_held
firmware/src/boards/template/input.cpp:12
↓ 2 callersFunctionlog
Log in the daemon [HH:MM:SS] style.
daemon/autostart_windows.py:33
↓ 2 callersFunctionmake_usage_panel
firmware/src/ui.cpp:292
↓ 2 callersFunctionmini_render
firmware/src/splash.cpp:103
↓ 2 callersFunctionopt
(k, def)
tools/convert_to_c.js:16
↓ 2 callersFunctionopt
(k, def)
tools/scrape_claudepix.js:20
↓ 2 callersFunctionpct_color
firmware/src/ui.cpp:205
↓ 2 callersFunctionpower_hal_battery_pct
firmware/src/boards/template/power.cpp:19
↓ 2 callersFunctionpower_hal_is_charging
firmware/src/boards/template/power.cpp:20
↓ 2 callersFunctionpower_hal_pwr_released
firmware/src/boards/template/power.cpp:26
↓ 2 callersFunctionprune_foreign_bonds
Delete every stored bond that isn't the owner, so the board stays paired to exactly one machine. Removing a bond shifts the indices, so restart from 0
firmware/src/ble.cpp:114
↓ 2 callersFunctionsound_hal_play_reset
firmware/src/boards/waveshare_amoled_18/sound.cpp:33
↓ 2 callersFunctionsplash_get_root
firmware/src/splash.cpp:290
↓ 2 callersFunctionstart_advertising
firmware/src/ble.cpp:141
↓ 2 callersFunctionui_update_battery
firmware/src/ui.cpp:686
↓ 2 callersFunctionui_update_ble_status
firmware/src/ui.cpp:676
↓ 2 callersFunctionupdate_view_state
Pick the usage-view sub-screen: pairing hint (BLE down), the idle "Zzz" screen (connected but data has gone stale), or the live usage panels. Only re-
firmware/src/ui.cpp:557
↓ 1 callersFunction_billing_period_info
Fraction of billing period elapsed (tp, 0-100) and period length in days (pd). Billing periods are assumed calendar-monthly: period_end is the re
daemon/claude_usage_daemon.py:437
↓ 1 callersFunction_billing_period_info
Fraction of billing period elapsed (tp, 0-100) and period length in days (pd). Monthly window is assumed (headers expose only reset_ts, not perio
daemon/claude_usage_daemon_windows.py:252
next →1–100 of 503, ranked by callers