config-editor-base 2.7.8 → 2.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -735,11 +735,32 @@ var publicSchemaFiles = function publicSchemaFiles(selectedConfig, schemaAry, co
735
735
  if (contentJSON.can_2 != undefined && contentJSON.connect && contentJSON.connect.cellular != undefined && contentJSON.gnss != undefined) {
736
736
  deviceType = "CANedge3 GNSS";
737
737
  }
738
+ if (contentJSON.sensor && contentJSON.sensor.gnss !== undefined) {
739
+ deviceType = "CANmod.gps";
740
+ }
741
+ if (contentJSON.sensor && contentJSON.sensor.channel_1 && contentJSON.sensor.channel_1.digital_low !== undefined) {
742
+ deviceType = "CANmod.input";
743
+ }
744
+ if (contentJSON.phy && contentJSON.phy.can && contentJSON.phy.can.route) {
745
+ deviceType = "CANmod.router";
746
+ }
747
+ if (contentJSON.sensor && contentJSON.sensor.top_left && contentJSON.sensor.top_left.type !== undefined) {
748
+ deviceType = "CANmod.temp";
749
+ }
750
+ var version = selectedConfig.substr(7, 5);
738
751
  var schemaAryFiltered = schemaAry.filter(function (e) {
739
- return e.includes(selectedConfig.substr(7, 5));
752
+ if (!e.includes(version)) return false;
753
+ if (deviceType && deviceType.startsWith('CANmod')) {
754
+ return e.includes(deviceType);
755
+ }
756
+ return true;
740
757
  });
741
758
  var uiSchemaAryFiltered = uiSchemaAry.filter(function (e) {
742
- return e.includes(selectedConfig.substr(7, 5));
759
+ if (!e.includes(version)) return false;
760
+ if (deviceType && deviceType.startsWith('CANmod')) {
761
+ return e.includes(deviceType);
762
+ }
763
+ return true;
743
764
  });
744
765
  if (!deviceType.includes("GNSS")) {
745
766
  schemaAryFiltered = schemaAryFiltered.filter(function (e) {