SDC Version 2.00 Release notes
I’ve bumped the version number up to 2.00 this time as there are quite a few changes including new ways to get data into SDC which opens it up to ECUs other than Speeduino. There has been a lot of changes under the hood to make this possible.
Major Enhancements
DBC Canbus Support (RusEFI, Haltech and others)
-
SDC now provides a new CANBus based datasource setting
datamode=dbccanbus
. This datamode enables multiple DBC files to be loaded and parsed into attributes that SDC can use to read the CAN data stream which the file(s) describe. So SDC can receive and display data from any CANBus sources which have a DBC file describing them. This includes rusEFI, Haltech, MegaSquirt etc. In some circumstances you will need to provide your own DBC file for your ECU.This capability is in addition to the other SDC and/or Speeduino specific canbus formats that already exist and are documented on this website.
DBC files for Haltech and rusEFI are included in the distribution.
For more details on this feature, see the DBC Support section
The new DBC mechanism is now used for decoding of Speeduino’s Haltech CAN messages support using a reduced version of the Haltech DBC file. Both the full Haltech DBC file and the Speeduino Haltech DBC file are packaged with the distribution. See below for further details.
New dbcplayback datamode
To go with the new DBC support, there is a new dbcplayback
datamode which plays back a recording of a CANBus stream that originated from a rusEFI device. The stream is approximately 5 minutes long and contains both rusEFI broadcast and Haltech dash broadcast data. See DBC Playback for further details.
This datamode should provide those who would like to see how SDC works with a CAN Based datastream some example data without having a physical CANBus connection to a real device.
A Pagset suitable for use with this stream (and for a rusEFI physical connection) has been included in the distribution and is called rusefidemo.xml
.
If anyone would like to contribute a log from a running engine please contact me.
New ‘Rates’ Feature
-
It is now possible to define attributes which hold calculated rates. Each rate is calculated from some other named source attribute and a given time period over which the rate is to be calculated.
Rates are defined in the ini file in the
[rates]
section.This feature enables values which are not available from some data sources to be synthesised from the relevant data. For example, you could generate a TPS per second rate, or an RPM per second rate. There are examples of these in the default SDC.ini file.
Clock Management and Time Sources
- The method for managing setting of the time and date on the device has been changed:
-
A new CANBus message has been added which broadcasts the UTC time in Unix time format, along with the device id from which it came.
Specific named settings of day, month, year, hour and minute are no longer used as the means to change the time on the device, because changing Day, Month, Year individually can generate invalid date combinations (e.g. 31st February) and this disrupts the process of setting the time and date correctly.
The Unix Time format is a well known format which is available in most development tools, meaning someone could easily develop a third party device which sent CANBus messages into SDC to set the time, if they did not have a time source connected directly to SDC.
The old Send Setting canbus message can still be used to set the value of any SDC setting from a third party device, but the code that sets the Pi’s date and time from the hard coded settings names of day, month, year, hour, and minute has been removed.
-
A new TimeDateGauge has been created which enables nominated settings to be grouped together into a date and time so that they can still be managed on screen with existing touch action features (incsetting etc) but be combined into one atomic time and date for setting the time. This gauge does not have a visual element.
-
A new touch action
settime=<timedate gauge name>
has been added which generates the time and date from the attributes named on the specified TimeDateGauge. This allows a single atomic operation of setting the time and date both on the local device and across the CANBus network where available.
Times are broadcast on the CANbus network as UTC time, but should be set in Local time on the user interface; the software will make the adjustment into UTC time. You must of course set the timezone on every device properly. Note that if multiple devices have a time source they will all broadcast their time on the bus. SDC will ignore time broadcasts if it has a local time source, otherwise it will only accept time broadcasts from the first device id it sees.
-
- If a GPS receiver is connected, UTC time will be taken from the GPS data and applied locally. Previously this was only done if a GPS lock was acquired but this rule has been relaxed as UTC time will be received from some satellites before the lock is established. The result is that the time is acquired earlier.
Support for UBlox 8 GPS Devices and new GPS settings
-
Support has been added for UBLox 8 USB GPS devices with the M8030 chipset. These devices are more powerful than the previously recommended vk172 device as they use the next generation chipset (the vk172 is a UBLox 7 device). They can lock on to a signal more efficiently, recognise more satellite constellations, and will use multiple constellations to acquire a fix more quickly. As part of adding this support, the internal methods for acquiring certain data items have been revised.
The M8030 or VK172 devices are automatically supported without any additional configuration, provided you use the ini file from the version 2.00 release or later.
If you do not want to copy over your existing ini file, you can update the [gps] section using the section from the ini file in the SDC 2.00 release.
Here is an example UBlox8 device (the one I developed the code against in fact) https://vi.aliexpress.com/item/1005004719866401.html
-
It is now possible (but not mandatory) to specify the Product ID and Vendor ID of a GPS device to be used in place of the supported UBlox 7 VK172 or Ublox8 M8030 devices. This override is specified in the cmdline.txt file. You would not normally need to use these settings for the supported vk172 or M8030 devices.
-
A new setting in the
[gps]
sectiondriver
has been added. This setting controls which driver to use for configuring the GPS receiver. See the entry in the table on the linked page for valid values. -
A new setting in the
[gps]
sectionlogmessages
has been added. This turns on or off the logging of gps messages being received. This logging can be very noisy so should not be left enabled. -
A new log filter GPS setting has been added. This works in tandem with the new
logmessages
setting, and applies a specified filter to the messages so that only those requested are logged. These logging features are present to enable users who have problems getting a lock to examine the data coming from the device and use it for support purposes. -
Some additional new GPS settings have been added to allow the position computation rate to be specified, as well as the output rate of satellite locks and satellites seen. The default configuration is 10hz position calculation and message output, with 2hz for satellites seen and 2hz for satellites locked. This is plenty to keep the locked and seen attributes up to date. These settings are specific to UBlox devices and will not work with other manufacturer’s chipsets.
If you edit the SDC.ini file with SDC Tools, the new settings are picked up when the USB cable for the GPS receiver is disconnected and reconnected. i.e. you don’t need to reboot SDC (although you can, obviously).
-
It is now possible to set the baud rate of the GPS device. The configured rate must match the receiver’s capabilities.
-
Some unnecessary NMEA messages are disabled when a UBlox 7 or 8 USB device is detected and initialised, so as to reduce the amount of data sent from the GPS device to SDC. This does not apply to any other chipsets, for which you must use
driver=none
.
Script functions for accessing attributes
-
A new script function
DoubleVal()
has been added, which will return the value of any named attribute as a floating point value (assuming it is of a numeric type). This enables attributes that are not automatically available as global variables to be used in scripts. -
A new script procedure
UpdateInternalAttribute()
has been added, which enables the value of an internal attribute (given by its name) to be updated with the supplied floating point value (datatype double). Note that updates to an attribute might not stick if the attribute is being updated by some other source such as serial or CANBus messages.
Sound
- It is now possible to define where sound is played when a warning is generated, by adding
audiotarget=
to the[pages]
section. For further details see the Pages ini file settings.
Other Improvements and fixes
Performance
-
The processing of CANBus messages has been changed to better cope with high data rates.
-
CPU percentage and clock speed measurements have been taken out of the main processing of data, and moved to a lower priority thread.
-
As all supported devices have 4 cores, some parts of the application have had their processor affinity set to specific cores. This improves throughput in some circumstances.
-
Saving of pagesets has been made significantly faster. Also benefitting from this change are page and gauge exports.
Secondary ECU attributes
- If Dual ECU support is being used (Speeduino only), then the ‘#2’ internal attributes need to be created on the SDC device designated as the Primary, so that they can be used in its pageset. A new
[datasource]
setting for the Primary SDC installationshowsecondaryattributes
has been added to instruct SDC to create then. This ensures that they do not appear unless they are really needed (most users will never need them).
Visual Stuff
-
Some performance improvements have been made which improve the frame rate by 10-15% when needle gauges are being drawn.
-
The ValueGauge will now generate an “<attribute name> not found” value on screen instead of an actual value if an unidentified attribute is set via the attribute property.
-
Some changes have been made to ensure that setting of the time and date when jumping in and out of daylight savings dates works properly.
-
All data items are now represented internally as attributes. So settings, definitions, DBC attributes, and canbus inputs all show as attributes in the attribute dialog and via the ‘attr’ command. DBC attributes will appear namespaced if one is defined. The separator between the namespace and the name of the attribute is a period.
-
Changes have been made to the ‘attr’ command to more clearly display the sources of the attributes.
-
A Crash, which would occur when setting the block size to zero for a Horizontal or Vertical gauge, has been fixed.
-
A crash, which would occasionally occur when the application was rebooted from SDC Tools after editing the sdc.ini file, has been fixed.
-
When using an image as the source for a horizontal gauge, the positioning of the image is now the same as if a bar is being drawn. Note that if the image is upside down (common with bitmap format files) then you can use xscale of -1 to flip it over.
GPS Related
- The
speedsource
setting now defaults to empty, instead of defaulting tovss
. This default only applies if there is no setting in the ini file, meaning existing releases and configurations will be unchanged. New distributions will requirespeedsource
to be configured to a value of some sort if you want to use it.
Other CANBus Changes
-
A new setting
canbusrejectionidlist
has been added to the[canbus]
section. This setting is a comma separated list of decimal CANBus IDs that should not be processed if any of them are received. -
A CANBus ID that is not recognised and passed to the CANBus inputs processing will no longer be written to the device log if it is not recognised as a canbus input.
-
A new setting
logunprocessedmessages
(value 0 or 1) has been added to the[canbus]
section. This setting specifies whether CANBus messages that have not been processed by SDC should be logged to the device log (only the Id is logged). If a message is rejected by thecanbusrejectionidlist
it cannot be logged. But messages not rejected by that list will be logged if not processed.
Haltechcanbus datamode changes (speeduino specific haltech canbus message processing)
- The
haltechcanbus
datamode, which is used to process Haltech canbus output from Speeduino, has been changed to utilise the new DBC based approach detailed in the highlights above. This removes the need for a hard-coded decoder and instead allows message decoding to be done using a cut-down version of the Haltech DBC file, which is shipped with the release. The new method results in some differences as below:- A new set of attributes will now be created in the
hal
namespace - The existing standard SDC global attributes will no longer be populated by default, although you may be able to add mappings for these yourself. For example, previously
O2
would contain the AFR, whereas now there will be aLambda
value inHAL.WDBAND_SEN1
. Note that in some cases, mappings will produce an incorrect value (for example you cannot map a Haltech temperature in Kelvin to a Speeduino temmperature value because speeduino temperatures do not have a large enough range. The mapping will succeed, but the value will be incorrect). - Temperatures are in Kelvin and do not contain the standard 40 degree offset that Speeduino uses.
- Some attributes will need to be divided down by up to 1000 to get the proper value (e.g.
HAL.WDBAND_SEN1
). SDC automatically calculates the divisor where possible. - Some attributes require a delta of -101.3 (typically pressures)
- A new set of attributes will now be created in the
Ideally, you will just update your pagesets to use the new hal
namespaced attributes.
Speeduino only generates about 8 different Haltech messages, hence the cut down Haltech DBC file for speeduino. If you have an ECU that generates a larger Haltech output (such as RusEFI or a Haltech ECU), then you should use datamode=dbccanbus
and use the haltech.dbc
file. For further details on how to do this see the DBC Support section
Autotune
- A new setting
dfcotype
has been added to the autotune ini file settings. This setting adds two options for how to determine when the ECU is in decel fuel cut mode. See the linked section for further details. This setting has been added because the DBC datamode enables ECUs other than Speeduino to be used to deliver data. These ECUs don’t necessarily have a decel fuel cut bit to test against like a Speeduino ECU does.
Software Upgrades
- When performing a software upgrade, SDC now re-requests the upgrade list file up to 5 times if it fails, before giving up. This reduces the chance of a failed upgrade since SDC tools might occasionally be unable to serve up the file.
Bug Fixes
-
A potential crash when the application is being initialised has been fixed. It might have occurred if the name of an attribute being used for a configurable warning was invalid.
-
If an image is set on the Horizontal Gauge using SDC tools, it will now load properly without needing the pageset to be saved and the device to be rebooted.
-
In the performance calculations, torque will not be calculated unless there is a non-zero speed. This requires the speedsource setting to be properly configured.
-
A device log message relating to the frame rate of TinySDC is now only generated if the display type is set to TinySDC.
-
A bug has been fixed in the SDC (server side) command handler for the SDC tools Set Timezone feature which would prevent it from working properly and require the tools to be restarted.
SDC Tools
-
A new datalogging graphical user interface has been added to SDC Tools. This enables the columns which are to be datalogged to be configured using those currently available on the selected device. The dialog also allows datalogging to be started and stopped. This start/stop feature controls the “enabled” setting in the ini file which means as well as starting or stopping immediately, the setting will survive a reboot.
The available columns are dependent on the datamode the device is running in. At present, the logging columns are stored in the ini file, and therefore apply regardless of which datamode is set. Therefore it is possible for certain columns to become unavailable when the datamode is changed.
-
It is now possible to define a “map group name”, which is a property of the pageset, using a button on the screen designer. When a map group name is defined, engine maps that are uploaded to the SDC instance from the Map Upload dialog will be written to a sub-folder under \enginemaps. The sub-folder will use the name specified in the group name setting.
This feature enables different pagesets to be tied to different sets of engine maps and is particularly useful if one SDC instance is being used to connect to different ECU’s with different tunes on them. If no map group name is specified, then the default location of \enginemaps is used (and may be used by multiple pagesets).
It is OK to have multiple pagesets using the same group name if they all share the same engine maps.
-
Prior to this release, all possible properties were listed against all gauge types. This has now been changed so that only those properties relevant to a gauge are listed when the gauge is selected. In addition to this, the order of properties has been set to a more logical ordering rather than the previous alphabetical method.
-
A new ‘Describe’ button has been added to the screen designer window. This displays some key parameters of the attribute of the currently selected gauge. The results are shown in the text box at the bottom of the window. The output is the same as the results displayed from the ‘describe’ command when used in the console window.
-
The software upgrade process dialog now resets itself at the end of the upgrade, ready for the next ugrade.
-
The Choose Attribute dialog now re-applies any search string already present from the last time it was used.
-
The search box in the Choose Attribute dialog is now case-insensitive.
-
The SDC Tools protocol version number has been changed for this release. This means that a new version of SDC Tools is mandatory after updating the SDC application.
-
When the ellipsis is pressed on a Font property, the dialog that appears now has font related titles and labels instead of them being image related.
Upgrading from SDC 1.70
To perform an upgrade from SDC 1.70 you can download the upgrade zip file, extract it to a temporary folder, and use the SDC Tools ‘Software Update’ feature.
The upgrade file must only ever be used for upgrading from version 1.70 to 2.00. It contains upgrade features that will not work with earlier releases. If you are on an earlier version, then either use the upgrade files in sequence, or perform a fresh install of version 2.00 and migrate your settings over manually.
Once you have upgraded the SDC instance, you will need to install SDC Tools 2.00 as the previous version will no longer connect due to the protocol changes.
If you upgrade SDC from version 1.70 using the upgrade file, your SDC.ini file will not be updated to avoid overwriting your existing configuration. Most new settings have defaults but some sections are entirely new, and if using any of the new functionality (such as DBC support) you may need to add these sections manually to your existing file.
You can see a copy of the SDC.ini file from version 2.00 here