Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Complete changes for default pins.cfg file
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Dillingham authored and Steven Dillingham committed Jun 27, 2014
1 parent 6569ed5 commit 0162656
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dctt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ bool loadPinMappingsFromFile(const char* filename) {
}

char buf[16];
for (i = 0; i < ...; i++) {
for (i = 0; i < 70; i++) {
switch (i)
{
case 0:
Expand All @@ -345,10 +345,10 @@ bool loadPinMappingsFromFile(const char* filename) {
else
sprintf(buf, ",\"A%d\":\"N/A\"", i - 54);
}
fileStream.write(buf, strlen(buf));
fileStream.write((uint8_t*) buf, strlen(buf));
}
fileStream.write('}');
filestream.close();
fileStream.close();
}

// Open the file.
Expand Down
17 changes: 17 additions & 0 deletions sd_card/web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,23 @@ app.controller('DoorsCtrl', ['$scope', 'ConfigService', 'WebsocketService', 'Ale
app.controller('ConfigCtrl', ['$scope', 'ConfigService', 'WebsocketService', 'AlertService',
function($scope, ConfigService, WebsocketService, AlertService) {

$scope.allowTab = function(e) {
if (e.keyCode == 9) {
// get caret position/selection
var val = e.currentTarget.value,
start = e.currentTarget.selectionStart,
end = e.currentTarget.selectionEnd;

e.currentTarget.value = val.substring(0, start) + '\t' + val.substring(end);

// put caret at right position again
e.currentTarget.selectionStart = e.currentTarget.selectionEnd = start + 1;

// prevent focus from moving
return false;
}
}

ConfigService.getNetworkConfig(
// If request succeeded, create the network object.
function(response) {
Expand Down

0 comments on commit 0162656

Please sign in to comment.