@@ -649,7 +649,7 @@ SDL.RadioModel = Em.Object.create({
649649 } ,
650650 } ;
651651
652- if ( this . radioControlStruct . band != 'XM' ) {
652+ if ( this . radioControlStruct . band != 'XM' ) {
653653 if ( forceGetAll || this . radioControlCheckboxes . rdsData . PS ) {
654654 result . rdsData . PS = this . radioControlStruct . rdsData . PS ;
655655 }
@@ -674,41 +674,40 @@ SDL.RadioModel = Em.Object.create({
674674 if ( forceGetAll || this . radioControlCheckboxes . rdsData . REG ) {
675675 result . rdsData . REG = this . radioControlStruct . rdsData . REG ;
676676 }
677+ }
677678
678- if ( forceGetAll || this . radioControlCheckboxes . signalStrength ) {
679- result . signalStrength = parseInt ( this . radioControlStruct . signalStrength ) ;
680- }
681-
682- if ( forceGetAll || this . radioControlCheckboxes . signalChangeThreshold ) {
683- result . signalChangeThreshold = parseInt ( this . radioControlStruct . signalChangeThreshold ) ;
684- }
679+ if ( forceGetAll || this . radioControlCheckboxes . signalStrength ) {
680+ result . signalStrength = parseInt ( this . radioControlStruct . signalStrength ) ;
681+ }
682+ if ( forceGetAll || this . radioControlCheckboxes . signalChangeThreshold ) {
683+ result . signalChangeThreshold = parseInt ( this . radioControlStruct . signalChangeThreshold ) ;
684+ }
685+ if ( forceGetAll || this . radioControlCheckboxes . state ) {
686+ result . state = this . radioControlStruct . state ;
687+ }
685688
686- if ( forceGetAll || this . radioControlCheckboxes . state ) {
687- result . state = this . radioControlStruct . state ;
688- }
689-
690- result . hdRadioEnable = this . radioControlStruct . hdRadioEnable ;
689+ result . hdRadioEnable = this . radioControlStruct . hdRadioEnable ;
691690
692- if ( this . radioControlStruct . hdRadioEnable ) {
693- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationShortName ) {
691+ if ( this . radioControlStruct . hdRadioEnable ) {
692+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationShortName ) {
694693 result . sisData . stationShortName = this . radioControlStruct . sisData . stationShortName ;
695694 }
696- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLongName ) {
695+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLongName ) {
697696 result . sisData . stationLongName = this . radioControlStruct . sisData . stationLongName ;
698697 }
699- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationMessage ) {
698+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationMessage ) {
700699 result . sisData . stationMessage = this . radioControlStruct . sisData . stationMessage ;
701700 }
702- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationIDNumber . countryCode ) {
701+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationIDNumber . countryCode ) {
703702 result . sisData . stationIDNumber . countryCode = parseInt ( this . radioControlStruct . sisData . stationIDNumber . countryCode ) ;
704703 }
705- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationIDNumber . fccFacilityId ) {
704+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationIDNumber . fccFacilityId ) {
706705 result . sisData . stationIDNumber . fccFacilityId = parseInt ( this . radioControlStruct . sisData . stationIDNumber . fccFacilityId ) ;
707706 }
708- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLocation . gpsLocation ) {
707+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLocation . gpsLocation ) {
709708 result . sisData . stationLocation . longitudeDegrees = parseFloat ( this . radioControlStruct . sisData . stationLocation . longitudeDegrees ) ;
710709 result . sisData . stationLocation . latitudeDegrees = parseFloat ( this . radioControlStruct . sisData . stationLocation . latitudeDegrees ) ;
711- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLocation . altitudeMeters ) {
710+ if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLocation . altitudeMeters ) {
712711 result . sisData . stationLocation . altitudeMeters = parseFloat ( this . radioControlStruct . sisData . stationLocation . altitudeMeters ) ;
713712 }
714713 }
@@ -723,57 +722,26 @@ SDL.RadioModel = Em.Object.create({
723722 result . hdChannel = this . radioControlStruct . hdChannel ;
724723 }
725724 }
726- }
727- }
728- if ( forceGetAll || this . radioControlCheckboxes . signalStrength ) {
729- result . signalStrength = parseInt ( this . radioControlStruct . signalStrength ) ;
730- }
731- if ( forceGetAll || this . radioControlCheckboxes . signalChangeThreshold ) {
732- result . signalChangeThreshold = parseInt ( this . radioControlStruct . signalChangeThreshold ) ;
733- }
734- if ( forceGetAll || this . radioControlCheckboxes . state ) {
735- result . state = this . radioControlStruct . state ;
736- }
737- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationShortName ) {
738- result . sisData . stationShortName = this . radioControlStruct . sisData . stationShortName ;
739- }
740- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLongName ) {
741- result . sisData . stationLongName = this . radioControlStruct . sisData . stationLongName ;
742- }
743- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationMessage ) {
744- result . sisData . stationMessage = this . radioControlStruct . sisData . stationMessage ;
745- }
746- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationIDNumber . countryCode ) {
747- result . sisData . stationIDNumber . countryCode = parseInt ( this . radioControlStruct . sisData . stationIDNumber . countryCode ) ;
748- }
749- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationIDNumber . fccFacilityId ) {
750- result . sisData . stationIDNumber . fccFacilityId = parseInt ( this . radioControlStruct . sisData . stationIDNumber . fccFacilityId ) ;
751725 }
752- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLocation . gpsData ) {
753- result . sisData . stationLocation . longitudeDegrees = parseFloat ( this . radioControlStruct . sisData . stationLocation . longitudeDegrees ) ;
754- result . sisData . stationLocation . latitudeDegrees = parseFloat ( this . radioControlStruct . sisData . stationLocation . latitudeDegrees ) ;
755- if ( forceGetAll || this . radioControlCheckboxes . sisData . stationLocation . altitude ) {
756- result . sisData . stationLocation . altitude = parseFloat ( this . radioControlStruct . sisData . stationLocation . altitude ) ;
757- }
758726
759727 if ( forceGetAll || this . radioControlCheckboxes . band ) {
760728 result . band = this . radioControlStruct . band ;
761729 }
730+ }
762731
763- if ( Object . keys ( result . rdsData ) . length == 0 ) {
764- delete result [ 'rdsData' ] ;
765- }
766- if ( Object . keys ( result . sisData . stationIDNumber ) . length == 0 ) {
767- var temp = result . sisData ;
768- delete temp [ 'stationIDNumber' ] ;
769- }
770- if ( Object . keys ( result . sisData . stationLocation ) . length == 0 ) {
771- var temp = result . sisData ;
772- delete temp [ 'stationLocation' ] ;
773- }
774- if ( Object . keys ( result . sisData ) . length == 0 ) {
775- delete result [ 'sisData' ] ;
776- }
732+ if ( Object . keys ( result . rdsData ) . length == 0 ) {
733+ delete result [ 'rdsData' ] ;
734+ }
735+ if ( Object . keys ( result . sisData . stationIDNumber ) . length == 0 ) {
736+ var temp = result . sisData ;
737+ delete temp [ 'stationIDNumber' ] ;
738+ }
739+ if ( Object . keys ( result . sisData . stationLocation ) . length == 0 ) {
740+ var temp = result . sisData ;
741+ delete temp [ 'stationLocation' ] ;
742+ }
743+ if ( Object . keys ( result . sisData ) . length == 0 ) {
744+ delete result [ 'sisData' ] ;
777745 }
778746
779747 return result ;
0 commit comments