servo

package
v0.0.0-...-cd06882 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// File flag created in logs folder to request next servod start
	// use recovery mode by providing argument REC_MODE=1.
	ServodUseRecoveryModeFlag = "servod_use_recovery_mode"
)

Variables

This section is empty.

Functions

func IsContainerizedServoHost

func IsContainerizedServoHost(ctx context.Context, servoHost *tlw.ServoHost) bool

IsContainerizedServoHost checks if the servohost is using servod container.

func KillActiveUpdaterProcesses

func KillActiveUpdaterProcesses(ctx context.Context, r execs.Runner, timeout time.Duration, deviceSerial string) error

KillActiveUpdaterProcesses kills any active servo_updater processes running on the host.

func MaximalAvgSbuValue

func MaximalAvgSbuValue(ctx context.Context, servod components.Servod, checkCount int) (float64, error)

MaximalAvgSbuValue determines the larger of the average SBU voltages for the controls 'servo_dut_sbu1_mv' and 'servo_dut_sbu2_mv'.

func ResetUsbkeyAuthorized

func ResetUsbkeyAuthorized(ctx context.Context, run execs.Runner, servoSerial string, servoType string) error

ResetUsbkeyAuthorized resets usb-key detected under labstation.

This is work around to address issue found for servo_v4p1. TODO(b/197647872): Remove as soon issue will be addressed.

func UpdateDevicesServoFw

func UpdateDevicesServoFw(ctx context.Context, r execs.Runner, req FwUpdaterRequest, devices []*tlw.ServoTopologyItem) []*tlw.ServoTopologyItem

UpdateDevicesServoFw will try to update every board (servo devices) within the servo topology.

@return: slice of the board (servo device) that didn't update successfully.

Types

type FwUpdaterRequest

type FwUpdaterRequest struct {
	// Whether the current DUT's ServoHost is using container servod.
	UseContainer bool
	// Firmware channel of the servo for the current DUT.
	FirmwareChannel tlw.ServoFwChannel
	// Count of attempts to update servo firmware.
	TryAttemptCount int
	// Try force update again if the first fw update attempt failed.
	TryForceUpdateAfterFail bool
	// Force to update the servo fw using the force update command.
	ForceUpdate bool
	// Do not check the version on the device.
	IgnoreVersion bool
}

FwUpdaterRequest is the request struct for updating the servo firmware of current DUT's servo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL