File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed
Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " djsoft-radioboss" ,
3- "version" : " 1.0.8 " ,
3+ "version" : " 1.0.9 " ,
44 "api_version" : " 1.0.0" ,
55 "keywords" : [
66 " Radio" ,
Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ async function getData(type, cmd) {
198198 try {
199199 let encoderArray = result [ 'Encoders' ] [ 'Encoder' ] ;
200200 if ( isArray ( encoderArray ) ) {
201- self . log ( 'debug' , 'Encoders is an array' ) ;
201+ let strEncoders = JSON . stringify ( self . STATUS . encoders ) ; //store the existing value as a string for comparison later
202+
202203 self . STATUS . encoders = [ ] ;
203204 for ( let i = 0 ; i < encoderArray . length ; i ++ ) {
204205 let encoder = encoderArray [ i ] [ '$' ] ;
@@ -214,19 +215,15 @@ async function getData(type, cmd) {
214215 encoderObj . label = encoderObj [ 'name' ] ;
215216
216217 self . STATUS . encoders . push ( encoderObj ) ;
217- }
218- self . updateVariableDefinitions ( ) ;
219- }
220- else {
221- self . log ( 'debug' , 'Encoders is not an array' ) ;
222- self . log ( 'debug' , encoderArray ) ;
223- }
224-
225- let resultString = JSON . stringify ( result ) ;
226-
227- if ( self . lastEncoderContent !== resultString ) { //keep it from showing up in the log a million times
228- self . log ( 'debug' , resultString ) ;
229- self . lastEncoderContent = resultString ;
218+ }
219+
220+ if ( strEncoders !== JSON . stringify ( self . STATUS . encoders ) ) {
221+ self . updateVariableDefinitions ( ) ;
222+ self . feedbacks ( ) ;
223+ }
224+
225+ self . checkVariables ( ) ;
226+ self . checkFeedbacks ( ) ;
230227 }
231228 }
232229 catch ( error ) {
You can’t perform that action at this time.
0 commit comments