Skip to content

Commit

Permalink
BeePrint 1.6.1 MKS WiFi 1.3 Minor fix on Portuguese language and
Browse files Browse the repository at this point in the history
firmware compiled with double MHz (from 80MHz to 160Mhz) for better
performance
  • Loading branch information
xreef committed Feb 7, 2023
1 parent 08f01e7 commit 1166452
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 55 deletions.
27 changes: 0 additions & 27 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
<builder buildPath="${workspace_loc:/MKS_WIFI_source}/Release" id="io.sloeber.sketch.builder.272935153" keepEnvironmentInBuildfile="false" name="Generatore di sketch Arduino" parallelBuildOn="false" superClass="io.sloeber.sketch.builder"/>
<tool id="io.sloeber.tool.sketch.compiler.cpp.1257752036" name="Compilatore Arduino C++" superClass="io.sloeber.tool.sketch.compiler.cpp">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="io.sloeber.compiler.cpp.sketch.option.incpath.1386314554" name="Cartelle incluse (-I)" superClass="io.sloeber.compiler.cpp.sketch.option.incpath" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/core/variant}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/core/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266HTTPClient/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/EEPROM}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266mDNS/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ArduinoJson/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/WebSockets/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/Hash/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266WiFi/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/core/variant}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/core/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/libraries/ESP8266mDNS/src}&quot;"/>
Expand All @@ -42,15 +33,6 @@
</tool>
<tool id="io.sloeber.tool.compiler.c.2125194466" name="Compilatore Arduino C" superClass="io.sloeber.tool.compiler.c">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="io.sloeber.compiler.c.sketch.option.incpath.1103533910" name="Cartelle incluse (-I)" superClass="io.sloeber.compiler.c.sketch.option.incpath" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/core/variant}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/core/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266HTTPClient/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/EEPROM}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266mDNS/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ArduinoJson/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/WebSockets/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/Hash/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266WiFi/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/core/variant}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/core/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/libraries/ESP8266mDNS/src}&quot;"/>
Expand All @@ -65,15 +47,6 @@
</tool>
<tool id="io.sloeber.tool.sketch.compiler.s.930830389" name="Compilatore codice macchina Arduino" superClass="io.sloeber.tool.sketch.compiler.s">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="io.sloeber.compiler.asm.sketch.option.incpath.1484722863" name="Cartelle incluse (-I)" superClass="io.sloeber.compiler.asm.sketch.option.incpath" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/core/variant}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/core/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266HTTPClient/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/EEPROM}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266mDNS/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ArduinoJson/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/WebSockets/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/Hash/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_source/libraries/ESP8266WiFi/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/core/variant}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/core/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/MKS_WIFI_upgrade_with_BeePrint_web_interface/libraries/ESP8266mDNS/src}&quot;"/>
Expand Down
4 changes: 2 additions & 2 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<link>
<name>libraries/ArduinoJson</name>
<type>2</type>
<location>D:/program/Sloeber/arduinoPlugin/libraries/ArduinoJson/6.19.4</location>
<location>D:/program/Sloeber/arduinoPlugin/libraries/ArduinoJson/6.20.0</location>
</link>
<link>
<name>libraries/EEPROM</name>
Expand Down Expand Up @@ -74,7 +74,7 @@
<link>
<name>libraries/WebSockets</name>
<type>2</type>
<location>D:/program/Sloeber/arduinoPlugin/libraries/WebSockets/2.3.6</location>
<location>D:/program/Sloeber/arduinoPlugin/libraries/WebSockets/2.3.5</location>
</link>
</linkedResources>
</projectDescription>
2 changes: 1 addition & 1 deletion .settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project>
<configuration id="io.sloeber.core.sketch.0" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider class="io.sloeber.core.toolchain.ArduinoLanguageProvider" console="false" env-hash="-1494979745869443979" id="io.sloeber.languageSettingsProvider" keep-relative-paths="false" name="Impostazioni compilatore Arduino" parameter="${COMMAND} -E -P -v -dD -D__IN_ECLIPSE__ &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="io.sloeber.core.toolchain.ArduinoLanguageProvider" console="false" env-hash="-1560456829279400395" id="io.sloeber.languageSettingsProvider" keep-relative-paths="false" name="Impostazioni compilatore Arduino" parameter="${COMMAND} -E -P -v -dD -D__IN_ECLIPSE__ &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
10 changes: 5 additions & 5 deletions .sproject
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ Config.Release.board.BOARD.ID=nodemcuv2
Config.Release.board.BOARD.MENU.baud=921600
Config.Release.board.BOARD.MENU.dbg=Disabled
Config.Release.board.BOARD.MENU.eesz=4M2M
Config.Release.board.BOARD.MENU.exception=enabled
Config.Release.board.BOARD.MENU.ip=lm2f
Config.Release.board.BOARD.MENU.exception=legacy
Config.Release.board.BOARD.MENU.ip=lm2n
Config.Release.board.BOARD.MENU.led=2
Config.Release.board.BOARD.MENU.lvl=None____
Config.Release.board.BOARD.MENU.ssl=all
Config.Release.board.BOARD.MENU.vt=flash
Config.Release.board.BOARD.MENU.wipe=none
Config.Release.board.BOARD.MENU.xtal=80
Config.Release.board.BOARD.MENU.wipe=all
Config.Release.board.BOARD.MENU.xtal=160
Config.Release.board.BOARD.TXT=${SLOEBER_HOME}/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/boards.txt
Config.Release.board.PROGRAMMER.NAME=
Config.Release.board.UPLOAD.PORT=COM3
Config.Release.board.UPLOAD.PORT=COM26
Config.Release.compile.sloeber.extra.all=
Config.Release.compile.sloeber.extra.archive=
Config.Release.compile.sloeber.extra.assembly=
Expand Down
2 changes: 1 addition & 1 deletion HSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void HSPIClass::setFrequency(uint32_t freq) {
// accurate match use it!
memcpy(&bestReg, &reg, sizeof(bestReg));
break;
} else if(calFreq < (int32_t) freq) {
} else if(calFreq < (uint32_t) freq) {
// never go over the requested frequency
if(abs((long int)(freq - calFreq)) < abs((long int)(freq - bestFreq))) {
bestFreq = calFreq;
Expand Down
Binary file removed MKS_WIFI_source.ino.nodemcu.bin
Binary file not shown.
24 changes: 14 additions & 10 deletions MKS_WIFI_upgrade_with_BeePrint_web_interface.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
#include <EMailSender.h>
#endif

#define ENABLE_CORS
// #define ENABLE_CORS

// #define EXTENDED_API

#define MKSWIFI_DEBUG
// #define MKSWIFI_DEBUG

// Define where debug output will be printed.
#define DEBUG_PRINTER Serial1
Expand Down Expand Up @@ -71,7 +71,7 @@ extern "C" {

}

char* firmwareVersion = "MISCHIANTI_v1.2";
char* firmwareVersion = "MISCHIANTI_v1.3";



Expand All @@ -82,9 +82,9 @@ boolean GET_VERSION_OK = false;


#ifdef SHOW_PASSWORDS
# define PASSWORD_INPUT_TYPE "\"text\""
# define PASSWORD_INPUT_TYPE F("\"text\"")
#else
# define PASSWORD_INPUT_TYPE "\"password\""
# define PASSWORD_INPUT_TYPE F("\"password\"")
#endif

char wifi_mode[] = {"wifi_mode_sta"};
Expand Down Expand Up @@ -285,7 +285,7 @@ OperatingState currentState = OperatingState::Unknown;
ADC_MODE(ADC_VCC); // need this for the ESP.getVcc() call to work

void fsHandler();
void handleGcode();
//void handleGcode();
void handleRrUpload();
void handleUpload();

Expand All @@ -299,6 +299,8 @@ void onWifiConfig();
void cloud_down_file(const char *url);
void cloud_down_file();

#ifdef EXTENDED_API

void handleConfig();
void handleApiPrinter();
void handleApiPrinterCtrl();
Expand All @@ -311,6 +313,8 @@ void handleApiPrint();
void handleApiPrintInf();
void handleApiLogs();

#endif

#define FILE_FIFO_SIZE (4096)
#define BUF_INC_POINTER(p) ((p + 1 == FILE_FIFO_SIZE) ? 0:(p + 1))

Expand Down Expand Up @@ -1058,9 +1062,9 @@ void query_printer_inf()
if(millis() - last_query_temp_time > 5000) //every 5 seconds
{
if(GET_VERSION_OK)
package_gcode("M27\nM992\nM994\nM991\nM997\n", false);
package_gcode(F("M27\nM992\nM994\nM991\nM997\n"), false);
else
package_gcode("M27\nM992\nM994\nM991\nM997\nM115\n", false);
package_gcode(F("M27\nM992\nM994\nM991\nM997\nM115\n"), false);

/*transfer_state = TRANSFER_READY;
digitalWrite(EspReqTransferPin, LOW);*/
Expand All @@ -1075,10 +1079,10 @@ void query_printer_inf()

if(GET_VERSION_OK)
//package_gcode("M27\nM997\n");
package_gcode("M991\nM27\nM997\n", false);
package_gcode(F("M991\nM27\nM997\n"), false);
else
//package_gcode("M27\nM997\nM115\n");
package_gcode("M991\nM27\nM997\nM115\n", false);
package_gcode(F("M991\nM27\nM997\nM115\n"), false);

/*transfer_state = TRANSFER_READY;
digitalWrite(EspReqTransferPin, LOW);*/
Expand Down
8 changes: 4 additions & 4 deletions MksHTTPUpdateServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void MksHTTPUpdateServer::setup(RepRapWebServer *server, const char * username,
&& (!upload.filename.startsWith("MksWifi_WebView.bin")))
{
Update_result = UPDATE_FILE_ERROR;
upload.status == UPLOAD_FILE_ABORTED;
upload.status = UPLOAD_FILE_ABORTED;

return;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ void MksHTTPUpdateServer::setup(RepRapWebServer *server, const char * username,
else
{
Update_result = UPDATE_FILE_ERROR;
upload.status == UPLOAD_FILE_ABORTED;
upload.status = UPLOAD_FILE_ABORTED;
return;
}
}
Expand All @@ -155,7 +155,7 @@ void MksHTTPUpdateServer::setup(RepRapWebServer *server, const char * username,
else
{
Update_result = UPDATE_FILE_ERROR;
upload.status == UPLOAD_FILE_ABORTED;
upload.status = UPLOAD_FILE_ABORTED;


return;
Expand All @@ -164,7 +164,7 @@ void MksHTTPUpdateServer::setup(RepRapWebServer *server, const char * username,
else
{
Update_result = UPDATE_COMM_ERROR;
upload.status == UPLOAD_FILE_ABORTED;
upload.status = UPLOAD_FILE_ABORTED;
return;
}

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Version 1.6
Thanks to Ronaldo Risso for Portuguese language

##### Changelog
- 2023-02-07 BeePrint 1.6.1 MKS WiFi 1.3 Minor fix on Portuguese language and firmware compiled with double MHz (from 80MHz to 160Mhz) for better performance
- 2023-02-04 BeePrint 1.6 MKS WiFi 1.2 Add Portuguese language (thanks Ronaldo Risso), remaining time and minor fix
- 2022-02-03 BeePrint 1.5 MKS WiFi 1.2 Better RU translation, fix preload and check the file length
- 2022-01-08 BeePrint 1.4 MKS WiFi 1.2 Static IP configuration, mDNS, polish translation and minor fix
Expand Down
4 changes: 2 additions & 2 deletions RepRapWebServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ template<typename T> size_t streamFile(T &file, const String& contentType){
String _responseHeaders;

String _hostHeader;
bool _chunked;
bool _chunked = false;

uint32_t _postLength;
bool _servingPrinter;
bool _servingPrinter = false;
};


Expand Down
Binary file modified data/bundle.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion data/settings.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var settings = {"localDevIP":"192.168.1.35", "localRestPort":80, "localWSPort":8081};
var settings = {"localDevIP":"192.168.1.205", "localRestPort":80, "localWSPort":8081};
Binary file modified firmware_release/MksWifi.bin
Binary file not shown.
Binary file modified firmware_release/MksWifi_WebView.bin
Binary file not shown.
Binary file added firmware_release/debug_cors/MksWifi_1.3.bin
Binary file not shown.
Binary file not shown.
Binary file added firmware_release/wv/MksWifi_WebView_1.6.1.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ uint8_t DecStr2Int(int8_t * buf, int *result)
int index = 0;

int retVal = 0;
int8_t dot_flag = 0;
// int8_t dot_flag = 0;
int8_t negat_flag = 0;

if(buf == 0 || result == 0)
Expand Down Expand Up @@ -140,7 +140,7 @@ void paser_cmd(uint8_t *cmdRxBuf)
int8_t *tmpStr_e = 0;

float tmpTemp = 0;
int8_t rcv_ack_flag = 0;
// int8_t rcv_ack_flag = 0;
int32_t i, j, k;
int8_t inc_flag = 0;
int8_t num_valid = 0;
Expand Down

0 comments on commit 1166452

Please sign in to comment.