Speedometer README

To customize the Bar Speedometer edit the file (from USB Drive or _copy_to_usb folder): 'config/speedometer/speedometer-config.js'

/** speedometer-config.js ************************************************************** *\
|* =========================
|* Speedometer Configuration - Used to configure position of Speedometer values.
|* =========================
|* Main Speedometer Value: [0, 0, 0] - Large, Front, & Center.
|* Other Values: [ 0/1:(0 For Main Column OR 1 For Bottom Rows), Row Number, Position ]
|* Main Column Positions: 4 Values (1-4 From Top to Bottom)
|* Bottom Rows Positions: 5 Values Per Row (1-5 From Left to Right)
|* Examples:
|* [0, 1, 4] = [Main, Column, 4th position (Bottom of the Column)]
|* [1, 3, 1] = [Bottom, 3rd Row, First Position (Left Side)]
|* [1, 1, 5] = [Bottom, 1st Row, Last Position (Right Side)]
|* To Hide a Value = [1, 1, 0] (Any bottom row position 0 will hide the value)
|* To Change Bottom Row Push Command Knob ("Select")
|* Note: Only numbers inside [] brackets determine position, order in this list DOES NOT
\* ************************************************************************************* */
var spdBottomRows = 3;   //Number of Bottom Rows
var spdTbl = { // Example Layout:
  vehSpeed:   [0, 0, 0], //Vehicle Speed
  topSpeed:   [0, 1, 1], //Top Speed
  avgSpeed:   [0, 1, 2], //Average Speed
  gpsSpeed:   [0, 1, 3], //GPS Speed
  engSpeed:   [0, 1, 4], //Engine Speed
  trpTime:    [1, 1, 1], //Trip Time
  trpDist:    [1, 1, 2], //Trip Distance
  outTemp:    [1, 1, 3], //Outside Temperature
  inTemp:     [1, 1, 4], //Intake Temperature
  coolTemp:   [1, 1, 5], //Coolant Temperature
  gearPos:    [1, 2, 1], //Gear Position
  gearLvr:    [1, 1, 0], //Transmission Lever Position
  fuelLvl:    [1, 2, 2], //Fuel Gauge Level
  trpFuel:    [1, 2, 3], //Trip Fuel Economy
  totFuel:    [1, 2, 4], //Total Fuel Economy
  avgFuel:    [1, 2, 5], //Average Fuel Economy
  gpsAlt:     [1, 3, 2], //Altitude
  gpsAltMM:   [1, 3, 3], //Altitude Min/Max
  gpsHead:    [1, 3, 1], //GPS Heading
  gpsLat:     [1, 3, 4], //GPS Latitude
  gpsLon:     [1, 3, 5], //GPS Longitude
  trpIdle:    [1, 1, 0], //Idle Time
  trpEngIdle: [1, 1, 0], //Engine Idle Time
  engTop:     [1, 1, 0], //Engine Top Speed
  engLoad:    [1, 1, 0], //Engine Load
  batSOC:     [1, 1, 0], //Battery Charge State (i-stop)
};

// OverRide Values
/* ************************************************** */
/* Set overRideSpeed to true to use your values below */
/* If this is false the following values are not used */
var overRideSpeed=false;
/* ************************************************** */
/* * Start OverRide Variables *********************** */
var SORV = {
  // Set the language for the speedometer
  // Available EN, ES, DE, PL, SK, TR, FR, IT
  language: "EN",

  // Used for metric/US english conversion flag (C/F, KPH/MPH, Meter/Feet, L per 100km/MPG)
  // Set isMPH: true for MPH, Feet, MPG
  // Set isMPH: false for KPH, Meter
  isMPH: false,

  // Set This to true to start with the Bar Speedometer Mod
  // False to use the analog speedometer
  barSpeedometerMod: true,

  // Set true to enable multicontroller and other mod features in classic mode
  // If false then use classic speedometer without Mods
  speedMod: true,

  // Set to true to start the classic speedometer in analog mode
  // False to start in digital mode
  startAnalog: true,

  // Set it true for the StatusBar Speedometer
  // False if you don't want the small speedometer in statusbar
  StatusBarSpeedometer: true,

  // Set to true for Outside Temperature & Fuel Efficiency in the statusbar
  // False for Compass & Altitude
  sbTemp: false,

  // Set true if you want the original speedometer background image as in version 4.2 or below
  // False for no background
  // If "true" the opacity above will be ignored
  original_background_image: false,

  // Set the opacity of black background color for speedometer, to reduce the visibility of custom MZD background images
  // Possible values 0.0 (full transparent) until 1.0 (complete black background)
  black_background_opacity: 0.0,

  // Set unit for fuel efficiency to km/L
  // False for L/100km
  fuelEffunit_kml: false,

  // Set this to true for Fahrenheit
  // False for Celsius
  tempIsF: false,

  // For the Speed Bar false for Current Vehicle Speed
  // Set This to true if you want the Colored Bar to measure engine speed
  engineSpeedBar: false,

  // Set This to true to hide the Speed Bar
  // False shows he bar
  hideSpeedBar: false,

  // Set this to true to enable counter animation on the speed number
  // False to disable speed counter animation
  // The animation causes the digital number to lag by 1 second
  speedAnimation: false,
};

To customize the Speedometer Multicontroller functions edit the file (from USB Drive or _copy_to_usb folder): 'config/speedometer/speedometer-controls.js'

/** speedometer-controls.js ************************************************************** *\
|* =========================
|* Speedometer Controls - Used to map multicontroller "clicks" to toggle actions/events
|* =========================
|* Numbers may be used multiple times.  Ex: set all directions under bar to 4
|* and all multicontroller directions will toggle the background
|* KEY:
|* Both Speedometers: (Same by default but can be set independently)
|* 1: (Default: up) - Toggle Speed Unit (mph-km/h)
|* 3: (Default: right) - Toggle Temp C-F (mph mode) Fuel Eff L/km-km/100L (km/h mode)
|* 4: (Default: left) - Toggle Background
|* 8: (Default: hold.right) - Reset Trip Time, Distance, Top/Ave Speed
|* 9: (Default: hold.left) - Change Color Theme
|* Bar (Colored Speed Bar w/ Bottom Rows):
|* 0: (Default: select) - Show Next Bottom Row
|* 2: (Default: down) - Toggle Speed Bar (VehSpeed-RPM)
|* 5: (Default: hold.select) - Reset Layout
|* 6: (Default: hold.up) - Switch To Classic Speedometer
|* 7: (Default: hold.down) - Hide/Show Speed Bar
|* Classic (Analog w/ Compass):
|* 0: (Default: select) - Toggle Speed (Analog-Digital)
|* 2: (Default: down) - Toggle Larger Text
|* 5: (Default: hold.select) - Toggle Alternate Values (Time-Temp)
|* 6: (Default: hold.up) - Switch To Bar Speedometer
|* 7: (Default: hold.down) - Basic Speedo - Analog & Disables Toggles Except Itself To Toggle Back
|* ************************************************************************************* *|
|* null: To Disable Multicontroller Key (do not leave any blank!!!)
\* ************************************************************************************* */
var spdBtn = {
  bar: { // Controls for the Bar Speedometer context
    select: 0,
    up: 1,
    down: 2,
    right: 3,
    left: 4,
    hold: { // Used when the click is held for 2 seconds
      select: 5,
      up: 6,
      down: 7,
      right: 8,
      left: 9,
    }
  },
  classic: { // Controls for the Classic (Analog) Speedometer context
    select: 0,
    up: 1,
    down: 2,
    right: 3,
    left: 4,
    hold: { // Used when the click is held for 2 seconds
      select: 5,
      up: 6,
      down: 7,
      right: 8,
      left: 9,
    }
  }
};

To customize the Bar Speedometer color themes edit the file (from USB Drive or _copy_to_usb folder): 'config/speedometer/barThemes.css'

/* barThemes.css - Customize Bar Speedometer Color Themes
* Any Valid CSS Colors Can Be Used Examples:
* Names -    Ex: blue;
* Hex -      Ex: #00ff66;
* RGB -      Ex: rgb(100, 255, 0);
* HSL -      Ex: hsl(248, 53%, 58%);
* For More Info On CSS Colors Visit https://www.w3schools.com/colors/colors_names.asp
* Each Theme Has 3 Colors In This Order:
* Primary - Color of Values
* Secondary - Color of Labels/Units
* Border-Color - Color of the Box Borders
* If you know CSS then have fun with it
* CSS is a very forgiving language any errors in this file will be ignored
*/

/* Theme #1 */

#speedBarContainer.theme1 #vehdataMainDiv fieldset div, #speedBarContainer.theme1 #vehdataMainDiv [class*="vehDataMain"].pos0 div {
  /* Primary */
  color: aquamarine;
}

#speedBarContainer.theme1 #vehdataMainDiv [class*="vehDataMain"].pos0 legend .spunit span, #speedBarContainer.theme1 #vehdataMainDiv fieldset {
  /* Secondary */
  color: #64bfff;
  /* Border-Color */
  border-color: blue;
}

/* Theme #2 */

#speedBarContainer.theme2 #vehdataMainDiv fieldset div, #speedBarContainer.theme2 #vehdataMainDiv [class*="vehDataMain"].pos0 div {
  color: #3fff17;
}

#speedBarContainer.theme2 #vehdataMainDiv [class*="vehDataMain"].pos0 legend .spunit span, #speedBarContainer.theme2 #vehdataMainDiv fieldset {
  color: hsl(248, 53%, 58%);
  border-color: rgb(100, 0, 12);
}

/* Theme #3 */
...
...
...


Speedometer Changelog


# Update to Waisky2’s addon-all-fixed-auto-install-v2
# V3.0 - Initial
# V3.2 - Removed temperatures that did not work right,
#        added trip fuel economy which is based on cmu trip which does not correspond to speedometer trip ,
#        changed so all data is rounded which fixed smdb-read speed mismatch to cruse control
#        enlarged direction text,
#        cleaned up code
# V3.21  changed metric display to L per 100km
#
# Changes done by diginix:
# V3.3   added unit under speedometer for mph or km/h
#        replace dot with comma for L per 100km
#        optimized speed indicator angles in css
#        new graphics for rings, needle pointer, dial image with different layout for steps 5,10,20
#        html and css cleanup
#        some more layout tuning (e.g. text shadow)
# V3.4   rotating compass added
# V3.5   GPS Heading deleted, Latitude & Longitude added
# V3.6   added analog top speed indicator
#        small animated GPS speed and direction added in statusbar (toggleable with touch on clock)
# V3.7   complete new method for data retrieval with websocket
#        added GPS Altitude min & max
#        added multilingual support (EN,DE,ES)
#        added Waisky2’s video player v2
# V4.0   integrated as native app in menu
#        new statusbar speedo without animation javascript (better performance)
#        alternating gps altitude and direction
# V4.1   added trip distance
#        added language Polish (thanks to sauron2003 from mazda3revolution.com)
#        added total fuel efficiency in brackets behind current one
#        added selection for fuel efficiency unit in user config
#        some layout improvements
#        merged some code improvements by vic_bam85
# V4.2   added readme.txt
#        added language Slovak (thanks to sedrik7 from mazda3revolution.com)
#        added language Turkish (thanks to volcano2K from mazda3revolution.com)
#        added tachometer for engine speed
#        added second idle time if engine is running but car has no speed (opposite to iStop time)
#        changed trip distance to 20 meter accuracy (0.02 km)
#        fixed statusbar speedo overlapping with message icon if 4 icons are visible (BT,WIFI,BATTERY,MESSAGE)
# V4.3   added percentage display of both idle times
#        added semi transparent background for value table
#        added user config for customizing of speedometer background image
#        added language French (thanks to drean179 and Regg001 from mazda3revolution.com)

Speedometer Changelog (Since v5.5 before that it was 2 different speedometers)

v5.5

  • Analog, Modded and Bar Speedometers are now All In One
  • All options are available and will be applied to the proper Speedometer
  • Choose which speedometer to start with by default (if starting with Bar Speedometer other options will still determine the starting state of the Classic Speedometer)
  • The speedometer-config.js file now has all the options, set a variable to determine if override values are used or installed options.
  • Invalid Values Show "---" Such As Gear Position/Lever for Manual Transmissions
  • Toggles will Show The Action In A Statusbar Notification
  • Hold "Up" on multicontroller to switch between Classic and Bar Speedometer Mode
  • Hold "Down" in Classic mode to switch between Basic and Modded Speedometer (Basic is only analog with no toggles except long holds to change to Modded or Bar Speedometer)
  • Modded Speedometer (in Classic mode):
    • Single click "Up" to increase size of values
    • Multicontroller "Select" toggles between Digital and Analog speed
    • Single click "Down" to show alternate values
  • Bar Speedometer:
    • Configure The Amount of Bottom Rows in "speedometer-config.js" (Default 4)
    • Hold "Down" to show/hide speed bar
    • TAP Any 2 Values To Swap Their Positions!
      • Any Values Can Be Swapped Even The Main
      • When The Main Value Is Swapped An SBN Will Show With The Value Name
      • Tap Below The Bottom Row To Swap Hidden Values In Other Rows
      • Tap Selected Value Again To Cancel

v5.6

  • Bar Speedometer layout changes are remembered until shutdown
    • Exiting or changing speedometers no longer resets layout to default
    • Hold "Select" on the multicontroller to reset to your default layout
    • Change Between 5 Configurable Color Themes (hold.left)
  • Remap Multicontroller Functions speedometer-controls.js
    • All controls are able to be customized in speedometer-controls.js
  • Custom themes for bar speedometer with CSS (mostly colors but other CSS tweaks can be applied)