Skip to content

Commit c54d7e1

Browse files
authored
Update pwm.js
1 parent 0694194 commit c54d7e1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/pwm.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ setClockFreq (div){
7171
var freq = Math.round(19200000/div);
7272
Freq = freq/1000;
7373

74-
if(pwmObject === 1){
75-
setImmediate(function(){
76-
console.log('Frequency calculation (div ' + div +'): ' + Freq + ' KHz');
77-
});
78-
}
79-
exports.Freq = Freq;
74+
if(pwmObject === 1){
75+
setImmediate(function(){
76+
console.log('Frequency calculation (div ' + div +'): ' + Freq + ' KHz');
77+
});
78+
}
79+
exports.Freq = Freq;
8080
}
8181
else{
82-
throw new Error('setClock() error: invalid div value');
82+
throw new Error('setClock() error: invalid div value');
8383
}
8484
}
8585

@@ -118,7 +118,7 @@ setData (data){
118118

119119
start (){
120120
if(this._pw === 1){
121-
this._pw = this._T;
121+
this._pw = this._T;
122122
}
123123
rpi.pwmSetData(this._pin, this._pw);
124124
}

0 commit comments

Comments
 (0)