Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fixed set sduino cc1101_rAmpl 42 #801

Merged
merged 2 commits into from
Feb 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGED
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2020-02-28 - bug fixed set sduino cc1101 rAmpl 42
2020-02-25 - Allow lower case letters for hex values ​​in set / get cc1101_reg (#799)

* Allow lower case letters for hex values ​​in set / get cc1101_reg
Expand Down
10 changes: 5 additions & 5 deletions FHEM/00_SIGNALduino.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4676,11 +4676,11 @@ sub SetFreq {
}
sub setrAmpl {
my ($hash, @a) = @_;

# Todo: Abfrage in Grep auf Array ändern
return "a numerical value between 24 and 42 is expected" if($a[1] !~ m/^\d+$/ || $a[1] < 24 ||$a[1] > 42);
my ($v) = grep { $ampllist[$_] > $a[1] } (0 .. @ampllist-1);

return "$hash->{NAME}: A numerical value between 24 and 42 is expected." if($a[1] !~ m/^\d+$/ || $a[1] < 24 ||$a[1] > 42);
my $v;
for($v = 0; $v < @ampllist; $v++) {
last if($ampllist[$v] > $a[1]);
}
$v = sprintf("%02d", $v-1);
my $w = $ampllist[$v];
$hash->{logMethod}->($hash->{NAME}, 3, "$hash->{NAME}: setrAmpl, Setting AGCCTRL2 (1B) to $v / $w dB");
Expand Down
2 changes: 1 addition & 1 deletion controls_signalduino.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UPD 2020-02-25_21:05:07 219624 FHEM/00_SIGNALduino.pm
UPD 2020-02-28_21:11:33 219615 FHEM/00_SIGNALduino.pm
UPD 2017-06-23_17:43:38 14541 FHEM/10_FS10.pm
UPD 2019-12-26_22:50:15 19839 FHEM/10_SD_GT.pm
UPD 2016-09-18_21:22:06 10111 FHEM/14_BresserTemeo.pm
Expand Down