mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
unassign FRM-device if pin_mode fails (for unsupported pin_modes)
git-svn-id: https://svn.fhem.de/fhem/trunk@3021 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
54553765cf
commit
ae29e8c997
@ -358,7 +358,11 @@ FRM_Init_Pin_Client($$$) {
|
||||
eval {
|
||||
$hash->{IODev}->{FirmataDevice}->pin_mode($pin,$mode);
|
||||
};
|
||||
return "error setting Firmata pin_mode for ".$hash->{NAME}.": ".$@ if ($@);
|
||||
if ($@) {
|
||||
main::Log(2,"FRM_Init error setting pin_mode: ".$@);
|
||||
FRM_Client_Unassign($hash);
|
||||
return "error setting ".$hash->{NAME}." pin_mode for pin ".$pin;
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
return "no IODev set" unless defined $hash->{IODev};
|
||||
|
Loading…
Reference in New Issue
Block a user