From 73fbf929865193c3cb860a44c3f262fe3867ec23 Mon Sep 17 00:00:00 2001 From: ffedoroff Date: Wed, 2 Nov 2016 16:37:41 +0600 Subject: [PATCH 1/2] line shorter line is too long and luatool.py raize exception when uploading that file --- httpserver-header.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httpserver-header.lua b/httpserver-header.lua index d218722..d3ea3fa 100644 --- a/httpserver-header.lua +++ b/httpserver-header.lua @@ -13,7 +13,8 @@ return function (connection, code, extension, isGzipped) local function getMimeType(ext) -- A few MIME types. Keep list short. If you need something that is missing, let's add it. - local mt = {css = "text/css", gif = "image/gif", html = "text/html", ico = "image/x-icon", jpeg = "image/jpeg", jpg = "image/jpeg", js = "application/javascript", json = "application/json", png = "image/png", xml = "text/xml"} + local mt = {css = "text/css", gif = "image/gif", html = "text/html", ico = "image/x-icon", jpeg = "image/jpeg", + jpg = "image/jpeg", js = "application/javascript", json = "application/json", png = "image/png", xml = "text/xml"} if mt[ext] then return mt[ext] else return "text/plain" end end From ea74a6de7d6a6497446d35e674bd4d0354b8d713 Mon Sep 17 00:00:00 2001 From: Christian Fischer Date: Fri, 9 Dec 2016 17:54:31 +0100 Subject: [PATCH 2/2] modularize nodemcu-command, add start_baud parameter --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3b07436..2b1b523 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ NODEMCU-UPLOADER=../nodemcu-uploader/nodemcu-uploader.py PORT=/dev/cu.SLAB_USBtoUART SPEED=9600 +NODEMCU-COMMAND=$(NODEMCU-UPLOADER) -b $(SPEED) --start_baud $(SPEED) -p $(PORT) upload + ###################################################################### # End of user config ###################################################################### @@ -33,17 +35,17 @@ usage: # Upload one files only upload: - @python $(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(FILE) + @python $(NODEMCU-COMMAND) $(FILE) # Upload HTTP files only upload_http: $(HTTP_FILES) - @python $(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f)) + @python $(NODEMCU-COMMAND) $(foreach f, $^, $(f)) # Upload httpserver lua files (init and server module) upload_server: $(LUA_FILES) - @python $(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f)) + @python $(NODEMCU-COMMAND) $(foreach f, $^, $(f)) # Upload all upload_all: $(LUA_FILES) $(HTTP_FILES) - @python $(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f)) + @python $(NODEMCU-COMMAND) $(foreach f, $^, $(f))