fcr

package
v2.3.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ActuatorAircon = "aircon"
View Source
const ActuatorBoostValve = "boostvalve"
View Source
const ActuatorCoil = "coil"
View Source
const ActuatorFan1 = "fan1"
View Source
const ActuatorFan2 = "fan2"
View Source
const ActuatorFuelPump = "fuelpump"
View Source
const ActuatorInjectors = "injectors"
View Source
const ActuatorPTC = "ptc"
View Source
const ActuatorPurgeValve = "purgevalve"

Variables

This section is empty.

Functions

func WriteConfig

func WriteConfig(c *Config)

WriteConfig write the config file

Types

type ActionResponse

type ActionResponse struct {
	Success bool `json:"success"`
}

type AdjustmentResponse

type AdjustmentResponse struct {
	Adjustment string `json:"adjustment"`
	Value      int    `json:"value"`
}

type AvailablePorts

type AvailablePorts struct {
	Ports []string `json:"ports"`
}

type Config

type Config struct {
	// Config
	Port      string
	LogToFile string
	LogFolder string
	Loop      string
	Ports     []string
	Debug     string
	Frequency string
	Headless  string
	Version   string
	Build     string
}

Config readmems configuration

func NewConfig

func NewConfig() *Config

NewConfig creates a new instance of readmems config

func ReadConfig

func ReadConfig() *Config

ReadConfig reads the config file

type ECUActivate

type ECUActivate struct {
	Activate bool `json:"activate"`
}

type ECUActivateResponse

type ECUActivateResponse struct {
	Actuator string `json:"actuator"`
	Activate bool   `json:"activate"`
}

type ECUAdjustment

type ECUAdjustment struct {
	Steps int `json:"steps"`
}

type ECUConnectionPort

type ECUConnectionPort struct {
	Port string `json:"port"`
}

type MemsReader

type MemsReader struct {
	// Config FCR configuration
	Config *Config
	// ECU represents the serial connection to the ECU
	ECU *rosco.MemsConnection
	// Webserver
	WebServer *WebServer
}

MemsReader structure

func NewMemsReader

func NewMemsReader(version string, build string) *MemsReader

func (*MemsReader) OpenBrowser

func (reader *MemsReader) OpenBrowser()

OpenBrowser opens the browser

func (*MemsReader) StartWebServer

func (reader *MemsReader) StartWebServer()

type RelativePaths

type RelativePaths struct {
	Webroot string
	ExePath string
}

type WebServer

type WebServer struct {

	// HTTPPort used by the HTTP Server instance
	HTTPPort int
	// ServerRunning indicates where the server is active
	ServerRunning bool
	// contains filtered or unexported fields
}

WebServer the web interface

func NewWebServer

func NewWebServer(reader *MemsReader) *WebServer

NewWebInterface creates a new web interface

func (*WebServer) RunHTTPServer

func (webserver *WebServer) RunHTTPServer()

RunHTTPServer run the server

Jump to

Keyboard shortcuts

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