MCPcopy Index your code
hub / github.com/ecc1/medtronic

github.com/ecc1/medtronic @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
524 symbols 1,522 edges 98 files 218 documented · 42%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

medtronic

The medtronic package provides functions for communicating with Medtronic insulin pumps using SPI-connected radio modules.

Decoding of messages to and from the pump is derived primarily from Ben West's pioneering "Decoding Carelink" work, along with Pete Schwamb's code for RileyLink.

Radio configuration

The medtronic package and any programs that use it must be built with the appropriate Go build tag for the radio. Currently supported radios:

The default is the CC111x driver if no tags are specified.

Utility programs

The cmd directory contains a number of command-line applications:

  • mdt is a "Swiss army knife" application (analogous to the the openaps use pump ... commands)
  • mmtune scans for the best frequency to communicate with the pump
  • pumphistory retrieves pump history records and prints them
  • fakemeter sends a glucose value to the pump, as if from a connected glucometer
  • setbasals sets the pump's basal rate schedule from the command line
  • listen waits for a packet or a timeout, for use in scripts
  • sniff listens for pump communications and prints the packets it receives

Documentation

https://godoc.org/github.com/ecc1/medtronic

Extension points exported contracts — how you extend this code

Prog (FuncType)
Prog represents a function to be executed with the given arguments on the pump.
cmd/mdt/commands.go
Printer (FuncType)
Printer represents a function that prints an arbitrary value.
cmd/mdt/main.go

Core symbols most depended-on inside this repo

Error
called by 95
pump.go
SetError
called by 45
pump.go
Execute
called by 33
command.go
cmd
called by 24
cmd/mdt/commands.go
Close
called by 22
pump.go
BadResponse
called by 22
command.go
decodeBase
called by 18
historyrecord.go
TimeOfDay
called by 18
time.go

Shape

Function 304
Method 153
Struct 35
TypeAlias 28
FuncType 4

Languages

Go100%

Modules by API surface

historyrecord.go54 symbols
cmd/mdt/commands.go36 symbols
json.go29 symbols
command.go26 symbols
cgmrecord.go21 symbols
cmd/mdt/json.go20 symbols
units.go17 symbols
basal.go15 symbols
pump.go14 symbols
mockradio_test.go14 symbols
time.go13 symbols
cmd/mdt/main.go13 symbols

For agents

$ claude mcp add medtronic \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact