Skip to content

Commit

Permalink
ajout de l'option aucun par defaut pour les mise à jour firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Mar 13, 2024
1 parent 149e602 commit fd0c696
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion core/class/z2m.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function dependancy_end() {
}

public static function firmwareUpdate($_options = array()) {
if(file_exists('/dev/ttyLuna-Zigbee') && $_options['sub_controller'] != 'luna')){
if(file_exists('/dev/ttyLuna-Zigbee') && $_options['sub_controller'] != 'luna'){
throw new Exception(__("Attention il n'est pas possible de lancer ce type de mise à jour firmware sur votre box (vous ne pouvez lancer qu'une mise à jour de firmware Luna)", __FILE__));
}
config::save('deamonAutoMode', 0, 'z2m');
Expand Down
33 changes: 17 additions & 16 deletions desktop/modal/firmware_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,24 @@
<label class="col-sm-4 control-label">{{Port Zigbee}}</label>
<div class="col-sm-2">
<select class="firmwareAttr form-control" data-l1key="port">
<?php
if(file_exists('/dev/ttyS2')){
echo ' <option value="/dev/ttyS2">{{Atlas (/dev/ttyS2)}}</option>';
<option value="none">{{Aucun}}</option>
<?php
if(file_exists('/dev/ttyS2')){
echo ' <option value="/dev/ttyS2">{{Atlas (/dev/ttyS2)}}</option>';
}
if(file_exists('/dev/ttyLuna-Zigbee')){
echo '<option value="/dev/ttyLuna-Zigbee">{{Luna Zigbee (/dev/ttyLuna-Zigbee)}}</option>';
}
foreach (jeedom::getUsbMapping() as $name => $value) {
if(isset($findPort[$value])){
continue;
}
if(file_exists('/dev/ttyLuna-Zigbee')){
echo '<option value="/dev/ttyLuna-Zigbee">{{Luna Zigbee (/dev/ttyLuna-Zigbee)}}</option>';
}
foreach (jeedom::getUsbMapping() as $name => $value) {
if(isset($findPort[$value])){
continue;
}
echo '<option value="' . $value . '">' . $name . ' (' . $value . ')</option>';
}
if(file_exists('/dev/ttyAMA0')){
echo '<option value="/dev/ttyAMA0">/dev/ttyAMA0</option>';
}
?>
echo '<option value="' . $value . '">' . $name . ' (' . $value . ')</option>';
}
if(file_exists('/dev/ttyAMA0')){
echo '<option value="/dev/ttyAMA0">/dev/ttyAMA0</option>';
}
?>
</select>
</div>
</div>
Expand Down

0 comments on commit fd0c696

Please sign in to comment.