package medtronic

const (
	bolus Command = 0x42
)

// Bolus delivers the given amount of insulin as a bolus.
func (pump *Pump) Bolus(amount Insulin) {
	newer := pump.Family() >= 23
	if newer {
		panic("unimplemented")
	}
	n := byte(amount / 100)
	pump.Execute(bolus, n)
}

package medtronic

const (
	bolus Command = 0x42
)

// Bolus delivers the given amount of insulin as a bolus.
// For safety, this command is not attempted more than once.
func (pump *Pump) Bolus(amount Insulin) {
	newer := pump.Family() >= 23
	if newer {
		panic("unimplemented")
	}
	b := byte(amount / 100)
	n := pump.Retries()
	defer pump.SetRetries(n)
	pump.SetRetries(1)
	pump.Execute(bolus, b)
}

Make sure Bolus command is not repeated
Make sure Bolus command is not repeated
