Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blog:car_stuff_pycosworth_configuration [2021/08/18 10:37] – [Main Configuration File] john | blog:car_stuff_pycosworth_configuration [2021/08/18 10:56] (current) – [Configuring PyCosworth] john | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PyCosworth Configuration ====== | ====== PyCosworth Configuration ====== | ||
- | ===== Configuring PyCosworth ===== | + | {{: |
- | PyCosworth is a combination of code-reader/ | + | [[: |
The software can be configured to enable or disable most of those options. | The software can be configured to enable or disable most of those options. | ||
Line 25: | Line 25: | ||
Note: All of the modules run in their own process and communicate their state, so whilst the GraphicsIO module is running, all of the other modules are not blocked from using the processor. The main reason is that the SensorIO module is **always** running in the background, gathering sensor readings, and is never blocked from running by one of the other modules. For this reason, it is highly recommended that the software be run on a multi-core device such as a Raspberry Pi 3. | Note: All of the modules run in their own process and communicate their state, so whilst the GraphicsIO module is running, all of the other modules are not blocked from using the processor. The main reason is that the SensorIO module is **always** running in the background, gathering sensor readings, and is never blocked from running by one of the other modules. For this reason, it is highly recommended that the software be run on a multi-core device such as a Raspberry Pi 3. | ||
- | * USE_CONSOLE | + | * USE_CONSOLE |
* Enable or disable the **ConsoleIO** text output module which outputs sensor information to the command prompt in a basic, text-mode display. | * Enable or disable the **ConsoleIO** text output module which outputs sensor information to the command prompt in a basic, text-mode display. | ||
- | * USE_BUTTONS | + | * USE_BUTTONS |
* Enable the **GPIOButtionIO** joystick/ | * Enable the **GPIOButtionIO** joystick/ | ||
- | * USE_GRAPHICS | + | |
* Enable the **GraphicsIO** graphics output module. This module can display to various types of OLED hardware, either connected via the Raspberry Pi I2C or SPI bus. Enabling this module *also* activates an *emulated* display which is only possible on a machine with a working graphics display (for example a Pi with a desktop session, or a Linux desktop). | * Enable the **GraphicsIO** graphics output module. This module can display to various types of OLED hardware, either connected via the Raspberry Pi I2C or SPI bus. Enabling this module *also* activates an *emulated* display which is only possible on a machine with a working graphics display (for example a Pi with a desktop session, or a Linux desktop). | ||
- | * USE_DATALOGGER | + | |
* Enable the module which records sensor datastream to disk for later analysis. | * Enable the module which records sensor datastream to disk for later analysis. | ||
Line 38: | Line 38: | ||
Some of the module have additional major functionality that can be enabled or disabled - for example, activating certain types of additional sensors or display modes. | Some of the module have additional major functionality that can be enabled or disabled - for example, activating certain types of additional sensors or display modes. | ||
- | * USE_OLED_GRAPHICS | + | |
* Within the **GraphicsIO** module, activate output to one or more OLED graphics display screens. These are mono, or grayscale, dot matrix style displays that are used to show sensor information, | * Within the **GraphicsIO** module, activate output to one or more OLED graphics display screens. These are mono, or grayscale, dot matrix style displays that are used to show sensor information, | ||
- | * USE_SDL_GRAPHICS | + | |
* Within the **GraphicsIO** module, activates an emulated OLED graphics display screen for each actual OLED screen that is configured. This way the visualisation and other display output can be tested on a desktop or laptop system without access to the specific OLED hardware. This requires a display that is supported by *SDL* libraries for graphics output. Generally this means X11 on Linux or Windows on PC. | * Within the **GraphicsIO** module, activates an emulated OLED graphics display screen for each actual OLED screen that is configured. This way the visualisation and other display output can be tested on a desktop or laptop system without access to the specific OLED hardware. This requires a display that is supported by *SDL* libraries for graphics output. Generally this means X11 on Linux or Windows on PC. | ||
- | * USE_COSWORTH | + | |
* Try to activate Cosworth L8/P8 Pectel serial datastream sensors within the **SensorIO** module. See the [Pectel Serial Datastream](Pectel.md) guide which explains the format of the serial interface and how we use it. You will of course need the correct USB to RS232 adaptor on your laptop or Raspberry Pi to use it. | * Try to activate Cosworth L8/P8 Pectel serial datastream sensors within the **SensorIO** module. See the [Pectel Serial Datastream](Pectel.md) guide which explains the format of the serial interface and how we use it. You will of course need the correct USB to RS232 adaptor on your laptop or Raspberry Pi to use it. | ||
- | * USE_AEM | + | |
* Try to activate AEM Wideband X-series AFR sensors within the **SensorIO** module. You need an AEM wideband sensor with serial datastream connected to a secondary USB to RS232 adaptor on your laptop or Raspberry Pi. The [AEM installation guide](https:// | * Try to activate AEM Wideband X-series AFR sensors within the **SensorIO** module. You need an AEM wideband sensor with serial datastream connected to a secondary USB to RS232 adaptor on your laptop or Raspberry Pi. The [AEM installation guide](https:// | ||
- | * USE_SENSOR_DEMO | + | |
* Activate demo-mode sensor data within the **SensorIO** module which supplies a never-ending stream of bogus, demo data, as if the software was really connected to active sensors which were sending data. If enabled, this can be activated or de-activated at will, from the software whilst running. | * Activate demo-mode sensor data within the **SensorIO** module which supplies a never-ending stream of bogus, demo data, as if the software was really connected to active sensors which were sending data. If enabled, this can be activated or de-activated at will, from the software whilst running. | ||
Line 53: | Line 53: | ||
By default, only warnings and errors are output whilst the software is running. However, for debugging, either or both of these options can be set and will result in a lot more output from the software about what it is doing. | By default, only warnings and errors are output whilst the software is running. However, for debugging, either or both of these options can be set and will result in a lot more output from the software about what it is doing. | ||
- | * INFO | + | |
* Prints mainly status messages, some performance information | * Prints mainly status messages, some performance information | ||
- | * DEBUG | + | |
* Even more verbose output, including information of variable contents, timers, system calls, etc. | * Even more verbose output, including information of variable contents, timers, system calls, etc. | ||
| | ||
Line 64: | Line 64: | ||
==== Sensor Information ==== | ==== Sensor Information ==== | ||
- | * SENSOR_MAX_HISTORY | + | |
* The number of previous readings to keep at any point in time for any sensor. This can be used to smooth readings, generate graphics/ | * The number of previous readings to keep at any point in time for any sensor. This can be used to smooth readings, generate graphics/ | ||
- | * SENSOR_SLEEP_TIME | + | |
* The amount of time, in seconds, to sleep between each loop through the entire list of sensors. This should be greater than 0 in order to prevent CPU lockup. Values of 0.02 to 0.05 would enable between 50 (1/0.02) and 20 (1/0.05) sensor passes per second. **Reccomendation: | * The amount of time, in seconds, to sleep between each loop through the entire list of sensors. This should be greater than 0 in order to prevent CPU lockup. Values of 0.02 to 0.05 would enable between 50 (1/0.02) and 20 (1/0.05) sensor passes per second. **Reccomendation: | ||
- | * SENSOR_ERROR_HEARTBEAT_TIMER | + | |
* The time, in seconds, between error/ | * The time, in seconds, between error/ | ||
==== Cosworth ECU Settings ==== | ==== Cosworth ECU Settings ==== | ||
+ | |||
+ | Only valid if **USE_COSWORTH** is set to **True**. | ||
* COSWORTH_ECU_USB | * COSWORTH_ECU_USB | ||
Line 80: | Line 82: | ||
==== AEM Wideband AFR Settings ==== | ==== AEM Wideband AFR Settings ==== | ||
- | * AEM_USB | + | Only valid if **USE_AEM** is set to **True**. |
+ | |||
+ | | ||
* The serial to USB device which is connected to the AEM Wideband AFR sensor module/ | * The serial to USB device which is connected to the AEM Wideband AFR sensor module/ | ||
==== Graphics / OLED Display Settings ==== | ==== Graphics / OLED Display Settings ==== | ||
+ | |||
+ | These settings are only valid if the **USE_GRAPHICS** setting is set to **True**. They control how the emulated screen and the physical OLED screen behave, the sensors which are shown and/or their sizes and resolutions. | ||
* GFX_MASTER_SIZE | * GFX_MASTER_SIZE | ||
Line 102: | Line 108: | ||
==== Datalogger Settings ==== | ==== Datalogger Settings ==== | ||
- | * LOGGING_HEARTBEAT_TIMER | + | Datalogger settings are only valid if the **USE_DATALOGGER** variable is set to **True**. These settings configure how the data logging portion of the application works, including the name and location of where sensor data logs are stored. |
+ | |||
+ | | ||
* The time, in seconds, between update messages sent from the **DataLoggerIO** process to the user interface. This updates the user interface on whether the logger is running or not, or if it has encountered an error (such as disk space). **Reccomendation: | * The time, in seconds, between update messages sent from the **DataLoggerIO** process to the user interface. This updates the user interface on whether the logger is running or not, or if it has encountered an error (such as disk space). **Reccomendation: | ||
- | * LOGGING_ACTIVE_SLEEP | + | |
* Controls the granularity of the data logs which are written with sensor data. A higher value lowers the frequency at which a line of sensor data is written to disk. A value of **0.1** indicates that 10 lines of log data are written to disk in 1 second. The value of a sensor at the point it is written to disk is dependent on the refresh value of that sensor. Bear in mind that with the Cosworth ECU particularly, | * Controls the granularity of the data logs which are written with sensor data. A higher value lowers the frequency at which a line of sensor data is written to disk. A value of **0.1** indicates that 10 lines of log data are written to disk in 1 second. The value of a sensor at the point it is written to disk is dependent on the refresh value of that sensor. Bear in mind that with the Cosworth ECU particularly, | ||
* All sensors have a different refresh value (it doesn' | * All sensors have a different refresh value (it doesn' | ||
Line 111: | Line 119: | ||
* < | * < | ||
- | * LOGGING_SLEEP | + | |
* How long to sleep, in seconds, before responding to an ' | * How long to sleep, in seconds, before responding to an ' | ||
- | * LOGGING_DIR | + | |
* The directory where sensor logs should be written to. If the directory does not exist, it will be attempted to be created the first time the application runs. This should be in a location that the application can write to, not in a system directory or an administrative user. | * The directory where sensor logs should be written to. If the directory does not exist, it will be attempted to be created the first time the application runs. This should be in a location that the application can write to, not in a system directory or an administrative user. | ||
- | * LOGGING_FILE_PREFIX | + | |
* The first part of the filename of your sensor log files - this will be suffixed with an auto-incrementing numeric value. **Reccomendation: | * The first part of the filename of your sensor log files - this will be suffixed with an auto-incrementing numeric value. **Reccomendation: | ||
- | * LOGGING_FILE_SUFFIX | + | |
* The last part of your sensor log file names. **Reccomendation: | * The last part of your sensor log file names. **Reccomendation: | ||
+ | |||
+ | ==== Watchdog Timer Settings ==== | ||
+ | |||
+ | Watchdog timer settings are only relevant if the **USE_PI_WATCHDOG** variable is set to **True**. These settings configure how the Pi interacts with and responds to status information from the //Super Watchdog V2// addon. | ||
+ | |||
+ | * WATCHDOG_HEARTBEAT_TIMER | ||
+ | * The amount of time, in seconds, to send a //" | ||
+ | |||
+ | * WATCHDOG_POWER_TIMER | ||
+ | * How often, in seconds, to ask the watchdog timer/UPS addon to check the incoming power state to the Pi. This should be frequent enough to detect problems in the supply voltage (in the case where the ignition it turned off) without using too much processor time to do so. **Reccomendation: | ||
+ | |||
+ | * WATCHDOG_POWER_SHUTDOWN_TIMER | ||
+ | * How long after detecting the input voltage to the Pi has failed before beginning to shut down the system and save any open data logs. This should be short enough that the battery on the watchdog/ | ||
+ | |||
+ | * WATCHDOG_POWER_NOMINAL | ||
+ | * How many volts should be considered nominal to power the Pi. If less than this number of volts is detected, then consider the input power or ignition to have been disconnected and after the next // | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Back to main [[: |