Skip to content

Commit da98346

Browse files
committed
Add svg file types and fix pwm allocation
1 parent 310a530 commit da98346

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bonescript/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ analogWrite = exports.analogWrite = function(pin, value, freq, callback) {
361361
pinMode(pin, OUTPUT, pin.pwm.muxmode, 'disabled', 'fast');
362362

363363
// Clear up any unmanaged usage
364-
fs.writeFileSync(path+'/run', '0');
365364
fs.writeFileSync(path+'/request', '0');
366365

367366
// Allocate and configure the PWM
@@ -662,6 +661,8 @@ exports.Server = function(port, subdir, onconnect) {
662661
loadFile(uri, subdir, res, "text/html");
663662
} else if(uri.match(/\.(jpg|png|ico)$/i)) {
664663
loadFile(uri, subdir, res, "binary");
664+
} else if(uri.match(/\.svg(.)$/i)) {
665+
loadFile(uri, subdir, res, "image/svg+xml");
665666
} else {
666667
loadFile(uri, subdir, res, "text/plain");
667668
}

0 commit comments

Comments
 (0)