-
Notifications
You must be signed in to change notification settings - Fork 33
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
Filling the rfmode array for the attribute list. #1047
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1047 +/- ##
==========================================
+ Coverage 61.37% 61.45% +0.07%
==========================================
Files 124 128 +4
Lines 9298 9396 +98
Branches 1473 1484 +11
==========================================
+ Hits 5707 5774 +67
- Misses 2523 2543 +20
- Partials 1068 1079 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@sidey79, was hälst du von dem Vorschlag von @elektron-bbs hier? |
Ich finde es gut, Mit dieser Anpassung wird der protocol Hash auch mehrfach geladen, obwohl er identisch ist. Da es um Daten aus SD_Protocols geht, würde ich auch eher getKeys so erweitern, dass wir dort noch ein Value mitgeben welches vorhanden sein muss, so eine Art Filter. |
Das war eigentlich schon der Fall. Die sub SIGNALduino_Initialize wird nur einmal ausgeführt.
Das sollte jetzt nicht mehr der Fall sein.
Ich habe dafür jetzt checkProperty verwendet, da bekommen wir ja bereits den Wert geliefert. |
getKeys um eine Filterfunktion erweitert
Zusammensetzen von rfmode vereindacht
Ich habe getKeys mal erweitert und das verwendet. Ich bin aber immer noch der Meinung dass SIGNALduino_Initialize für jede Definition aufgerufen wird. |
Zeigst du uns den Code?
Dagegen spricht aber, das die Logausgaben (noch aus meinen Tests) nur genau einmal im Log auftauchen:
|
change variable name
…to master_rfmode
Ich dachte ich hätte ihn gestern abend noch gepusht. Wenn nicht, dann ist er jetzt defintiv im Repo.
Okay, Du hast natürlich recht. Der Variablenname $hash hat mich einfach mal wieder in die Irre geführt. |
Ah ja, daran habe ich nicht gedacht, dass der Grund des Sortierens in der Anzeige steckt. :) |
Hmm, irgdnwie sind manche Attribute doppelt vorhanden :-(
|
Ich würde das push erweitern, nur wenn das Attribut noch nicht im Array ist. |
Added check for correct sorted order of elements in rfmode
array rfmode wird in SIGNALduino_Initialize und nicht mehr global mit Wert initialisiert.
Ich habe es ein wenig anders gelöst. Das Problem lag daran, dass FHEM ja SIGNALduino_Initialize aufruft sobald das Modul geladen wird und wenn es erneut aufgerufen wird, dann erweitert es die rfmode Liste. Ich habe den Default von @RFmode in die sub verfrachtet, dadurch wird @RFmode vor jedem Aufruf immer auf den identischen Default gesetzt. |
Mhmm, wann wird das SIGNALduino-Modul denn erneut aufgerufen?
So geht es natürlich auch. |
Das passiert durch den Test aber auch durch jedes commandReload. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aus meiner Sicht spricht können wir das so übernehmen :)
What is the current behavior?
(You can also link to an open issue here, if this describes the current behavior)
Array rfmode must be added manually.
rfmode - from SD_ProtocolData.pm #980
What is the new behavior (if this is a feature change)?
The rfmode array is filled with the data from SD_ProtocolData.pm.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
no
Other information: