Skip to content

Commit

Permalink
Feat/rework scania (#116)
Browse files Browse the repository at this point in the history
* 🚧 #78 rework scania

Signed-off-by: JAGFx <[email protected]>

* 💄 #78 rework scania symbols

* 💄 #78 place symbole for scania

* 💄 #78 add gauge for scania

Signed-off-by: JAGFx <[email protected]>

* 💄 #78 add some item on menu

Signed-off-by: JAGFx <[email protected]>

* 🐛 #78 optimize some stuff

Signed-off-by: JAGFx <[email protected]>

* 💄 #78 add some symbole + cleanup

* 💄 #78 add warning and error message

Signed-off-by: JAGFx <[email protected]>

* 🗑️ #78 clean-up

Signed-off-by: JAGFx <[email protected]>

* 🗑️ #78 add some symbol display condition

Signed-off-by: JAGFx <[email protected]>

* 🗑️ #78 add manual for scania

Signed-off-by: JAGFx <[email protected]>

* 🚚 #99 move telemetry logic in javascript modules

Signed-off-by: JAGFx <[email protected]>

* 🚨 #99 correct linter errors

Signed-off-by: JAGFx <[email protected]>

* ✅ #99 add unit test system

Signed-off-by: JAGFx <[email protected]>

* ✅ #99 add unit test for common telemetry

Signed-off-by: JAGFx <[email protected]>

* ✅ #99 add unit test for common telemetry

Signed-off-by: JAGFx <[email protected]>

* ✅ #99 add unit test for common telemetry

Signed-off-by: JAGFx <[email protected]>

* ✅ #99 add unit test for gear telemetry

Signed-off-by: JAGFx <[email protected]>

* 🐛 [feat/rework-scania] #78 fix some stuff on symbol display

* 🐛 [feat/rework-scania] #78 #99 fix some stuff  scania dashboard

* ♻️ [feat/rework-scania] #78 #99 refactoring and add telemetry model helper

* 💄 [feat/rework-scania] #78 finalizing somme adjustment

* 📝 [feat/rework-scania] #78 update scania image

* 🐛 #78 update map skin

Signed-off-by: JAGFx <[email protected]>

* 💄 #78 update map skin

Signed-off-by: JAGFx <[email protected]>

* 💄 [feat/rework-scania] #78 finalizing somme adjustment on JAGFx and Default skin

* 💄 [feat/rework-scania] #78 prepare dashboard for scania next gen

* 💄 [feat/rework-scania] #78 add gauge on scania next gen skin

Signed-off-by: JAGFx <[email protected]>

* 💄 [feat/rework-scania] #78 add water gauge for scania next generation

Signed-off-by: JAGFx <[email protected]>

* ✨ [feat/rework-scania] add default menu configuration for scania skin

Signed-off-by: JAGFx <[email protected]>

* 💬 [feat/rework-scania] #77 update translations

Signed-off-by: JAGFx <[email protected]>

* 🐛 [feat/rework-scania] #78 finalizing somme adjustment on skins

* 🗑️ [feat/rework-scania] #78 global clean-up

* 👷 [feat/rework-scania] #78 fix ci

* 🐛 [feat/rework-scania] #78 finalizing somme adjustment on skins

* 🐛 [feat/rework-scania] #78 finalizing somme adjustment on skins
  • Loading branch information
JAGFx authored Apr 3, 2022
1 parent 41f6faa commit 271952f
Show file tree
Hide file tree
Showing 194 changed files with 60,854 additions and 42,525 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ module.exports = {
'plugin:vue/essential',
'plugin:vue/strongly-recommended',
'plugin:vue/recommended',
'plugin:jest/recommended',
'prettier'
],
plugins: ['prettier'],
parserOptions: {
ecmaVersion: 13
},
plugins: ['vue', 'html', 'prettier', 'jest'],
rules: {
'no-console': 1,
'no-debugger': 2,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
node-version: [ 16.x ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -28,4 +28,4 @@ jobs:
run: npm i

- name: Run linter
run: npm run ci
run: npm run lint
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ yarn-error.log*
*.sln
*.sw?

logs/
logs/
coverage/
11 changes: 11 additions & 0 deletions .run/Unit tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Unit tests" type="JavaScriptTestRunnerJest">
<node-interpreter value="project" />
<node-options value="" />
<jest-package value="$PROJECT_DIR$/node_modules/jest" />
<working-dir value="$PROJECT_DIR$" />
<envs />
<scope-kind value="ALL" />
<method v="2" />
</configuration>
</component>
22 changes: 22 additions & 0 deletions doc/CONFIG_SETTINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,29 @@ But, all game configuration have same entries.
</td>
<td>false</td>
</tr>
</table>

#### Scania

<table>
<tr>
<th>Key</th>
<th>Name</th>
<th>Values</th>
<th>Default</th>
</tr>
<tr>
<td>scania_default_menu</td>
<td>Default menu</td>
<td>
<ul>
<li>null</li>
<li>DrivingAssistance</li>
<li>InstantaneousData</li>
</ul>
</td>
<td>null</td>
</tr>
</table>

> Note: We can displayed 7 element max in the right side and 4 in the middle side. Place your element on the top.
Expand Down
2 changes: 1 addition & 1 deletion doc/SKINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ You can find the list of all skins integrated.
<td>Argiano - [email protected]</td>
</tr>
<tr>
<td><img src="../public/img/screenshots/scania.png" alt="JAGFX"></td>
<td><img src="../public/img/screenshots/scania.gif" alt="JAGFX"></td>
<td>Scania Dashboard</td>
<td>Klauzzy</td>
</tr>
Expand Down
45 changes: 45 additions & 0 deletions doc/TRANSLATION_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,51 @@
### Added

- Portuguese
- Launching
- Load configuration game
- Load app configuration file
- Start
- Manual
- Symbol
- Label
- General warning symbols
- Left direction indicator
- Right direction indicator
- Main beam is on
- Menu symbols
- The fuel level is low
- Downhill speed control
- Not yet implemented
- Accrued rest time
- Ad Blue
- Battery
- Cruise control, trip computer and driving time information
- Here, you can set and read off the trip computer; see current operating information and read driving time information from the digital tachograph.
- Instantaneous data
- Here you can view information about current consumption and current levels.
- Settings
- Vehicle information
- The vehicle information menu can be used to view cargo weights, status of the differential locks and tyre pressures. Which functions are shown depends on the vehicle’s equipment.
- Others symbols
- A fault occurred
- The parking brake is applied
- Vehicle EBS fault
- The driver’s safety belt is not fastened
- A warning occurred
- Engine failure
- Risk that the level of contaminants in the exhaust gases emitted by the vehicle will be too high. In some cases the engine output is limited and in some cases the vehicle speed is also limited.
- Differential lock is engaged
- The tag axle on the tractor is raised
- The tag axle on the trailer is raised
- The retarder is activated
- Bodybuilder symbols
- The rotating beacon is activated
- Low brake pressure in parking and trailer brake circuit.
- App
- Default menu
- Set the default menu for the Scania dashboard skin. It is displayed when you use this dashboard.
- Nothing
- Navigation

### Changed

Expand Down
34 changes: 34 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/

module.exports = {
roots: [
'<rootDir>/src',
'<rootDir>/test',
'<rootDir>/lib',
'<rootDir>/servers'
],
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.vue',
'src/**/*.js',
'!src/translations/*.yaml',
'!src/main.js',
'lib/**/*.js',
'!lib/sdk/',
'!lib/config/',
'servers/**/*.js'
],
moduleNameMapper: {
'@/(.*)$': '<rootDir>/src/$1'
},
moduleFileExtensions: ['js', 'json', 'node', 'yaml'],
transformIgnorePatterns: ['/node_modules/(?!ol)'],
transform: {
'^.+\\.(js)$': 'babel-jest',
'\\.yaml$': 'jest-transform-yaml'
},
testEnvironment: 'jsdom'
};
3 changes: 2 additions & 1 deletion lib/config/config.ats.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@
"jagfx_elements_right_map" : false,
"maps_map_tilesRemoteUseCustom" : false,
"maps_map_tilesRemoteCustomPath" : null,
"maps_general_debug" : false
"maps_general_debug" : false,
"scania_default_menu": null
}
3 changes: 2 additions & 1 deletion lib/config/config.ets2.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@
"jagfx_elements_right_map" : false,
"maps_map_tilesRemoteUseCustom" : false,
"maps_map_tilesRemoteCustomPath" : null,
"maps_general_debug" : false
"maps_general_debug" : false,
"scania_default_menu": null
}
58 changes: 29 additions & 29 deletions lib/sdk/scs_sdk_plugin_parsed_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"brakes" : {
"retarder" : {
"steps" : 5,
"level" : 0
"level" : 1
},
"airPressure" : {
"warning" : {
Expand All @@ -252,7 +252,7 @@
},
"emergency" : {
"factor" : 34.79999923706055,
"enabled" : false
"enabled" : true
},
"value" : 144.99745178222656
},
Expand All @@ -263,7 +263,7 @@
"enabled" : true
},
"motor" : {
"enabled" : false
"enabled" : true
}
},
"wheels" : [
Expand Down Expand Up @@ -482,13 +482,13 @@
"enabled" : true
},
"beamLow" : {
"enabled" : false
"enabled" : true
},
"beamHigh" : {
"enabled" : false
"enabled" : true
},
"beacon" : {
"enabled" : false
"enabled" : true
},
"brake" : {
"enabled" : false
Expand All @@ -504,10 +504,10 @@
"capacity" : 1000,
"warning" : {
"factor" : 0.15000000596046448,
"enabled" : false
"enabled" : true
},
"value" : 821.89013671875,
"avgConsumption" : 0,
"avgConsumption" : 0.5,
"range" : 2568.40673828125
},
"adBlue" : {
Expand All @@ -524,14 +524,14 @@
"factor" : 10.149999618530273,
"enabled" : true
},
"value" : 0
"value" : 50
},
"waterTemperature" : {
"warning" : {
"factor" : 105,
"enabled" : false
"enabled" : true
},
"value" : 16.795082092285156
"value" : 90.795082092285156
},
"batteryVoltage" : {
"warning" : {
Expand All @@ -542,30 +542,30 @@
},
"rpm" : {
"max" : 2500,
"value" : 0
"value" : 1500
},
"oilTemperature" : {
"value" : 16.817760467529297
},
"damage" : 0.00489132571965456,
"enabled" : false
"enabled" : true
},
"differential" : {
"ratio" : 3.9600000381469727,
"lock" : {
"enabled" : false
"enabled" : true
}
},
"speed" : {
"value" : 0.0009727554861456156,
"kph" : 0,
"mph" : 0
"value" : 36.1111,
"kph" : 50,
"mph" : 50
},
"cruiseControl" : {
"value" : 0,
"enabled" : false,
"kph" : 0,
"mph" : 0
"value" : 25,
"enabled" : true,
"kph" : 90,
"mph" : 12
},
"cabin" : {
"damage" : 0.0007348754443228245,
Expand Down Expand Up @@ -604,13 +604,13 @@
},
"odometer" : 108482.9609375,
"electric" : {
"enabled" : false
"enabled" : true
},
"wipers" : {
"enabled" : false
},
"liftAxle" : {
"enabled" : false,
"enabled" : true,
"indicator" : {
"enabled" : false
}
Expand Down Expand Up @@ -664,12 +664,12 @@
}
},
"position" : {
"X" : -6274.059234619141,
"Y" : 37.788394927978516,
"Z" : 9571.511840820312
"X": 52850.890144348145,
"Y": 5.716939926147461,
"Z": -31324.724784851074
},
"orientation" : {
"heading" : 0.13367897272109985,
"heading": 0.4390052556991577,
"pitch" : 0.0005585197359323502,
"roll" : 7.589098771632052e-8
},
Expand Down Expand Up @@ -1049,7 +1049,7 @@
"total" : 0.04498915374279022
},
"liftAxle" : {
"enabled" : false,
"enabled" : true,
"indicator" : {
"enabled" : false
}
Expand Down Expand Up @@ -1158,7 +1158,7 @@
"distance" : 780480.9375,
"time" : 39707175.78125,
"speedLimit" : {
"value" : 110,
"value" : 30.5556,
"kph" : 110,
"mph" : 110
}
Expand Down
Loading

0 comments on commit 271952f

Please sign in to comment.