Browse Source

Настройки PID в прошивке.

При подключении к WIFI показывает
адрес на экране
pull/1/head
Sergey 5 years ago
parent
commit
0271d32aca
  1. 23
      Marlin/Configuration.h
  2. 10
      Marlin/src/module/mks_wifi/mks_wifi.cpp

23
Marlin/Configuration.h

@ -486,9 +486,9 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker // Ultimaker
#define DEFAULT_Kp 22.2 //#define DEFAULT_Kp 22.2
#define DEFAULT_Ki 1.08 //#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114 //#define DEFAULT_Kd 114
// MakerGear // MakerGear
//#define DEFAULT_Kp 7.0 //#define DEFAULT_Kp 7.0
@ -500,6 +500,11 @@
//#define DEFAULT_Ki 2.25 //#define DEFAULT_Ki 2.25
//#define DEFAULT_Kd 440 //#define DEFAULT_Kd 440
//FB4S
#define DEFAULT_Kp 17.04
#define DEFAULT_Ki 1.31
#define DEFAULT_Kd 55.34
#endif // PIDTEMP #endif // PIDTEMP
//=========================================================================== //===========================================================================
@ -537,9 +542,9 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_bedKp 10.00 //#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023 //#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4 //#define DEFAULT_bedKd 305.4
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune //from pidautotune
@ -547,6 +552,12 @@
//#define DEFAULT_bedKi 1.41 //#define DEFAULT_bedKi 1.41
//#define DEFAULT_bedKd 1675.16 //#define DEFAULT_bedKd 1675.16
//FB4S
#define DEFAULT_bedKp 40.68
#define DEFAULT_bedKi 7.93
#define DEFAULT_bedKd 139.15
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #endif // PIDTEMPBED

10
Marlin/src/module/mks_wifi/mks_wifi.cpp

@ -1,6 +1,6 @@
#include "mks_wifi.h" #include "mks_wifi.h"
#include "../../lcd/ultralcd.h"
uint8_t mks_in_buffer[ESP_PACKET_DATA_MAX_SIZE]; uint8_t mks_in_buffer[ESP_PACKET_DATA_MAX_SIZE];
uint8_t mks_out_buffer[ESP_PACKET_DATA_MAX_SIZE]; uint8_t mks_out_buffer[ESP_PACKET_DATA_MAX_SIZE];
@ -19,6 +19,7 @@ void mks_wifi_init(void){
SET_OUTPUT(MKS_WIFI_IO_RST); SET_OUTPUT(MKS_WIFI_IO_RST);
WRITE(MKS_WIFI_IO_RST, LOW); WRITE(MKS_WIFI_IO_RST, LOW);
ui.set_status((const char *)"WIFI init",false);
safe_delay(1000); safe_delay(1000);
WRITE(MKS_WIFI_IO_RST, HIGH); WRITE(MKS_WIFI_IO_RST, HIGH);
@ -161,11 +162,18 @@ uint8_t mks_wifi_input(uint8_t data){
} }
void mks_wifi_parse_packet(ESP_PROTOC_FRAME *packet){ void mks_wifi_parse_packet(ESP_PROTOC_FRAME *packet){
static uint8_t show_ip_once=0;
char ip_str[30];
switch(packet->type){ switch(packet->type){
case ESP_TYPE_NET: case ESP_TYPE_NET:
if(packet->data[6] == ESP_NET_WIFI_CONNECTED){ if(packet->data[6] == ESP_NET_WIFI_CONNECTED){
if(show_ip_once==0){
show_ip_once=1;
sprintf(ip_str,"IP %d.%d.%d.%d",packet->data[0],packet->data[1],packet->data[2],packet->data[3]);
ui.set_status((const char *)ip_str,true);
}
DEBUG("[Net] connected, IP: %d.%d.%d.%d",packet->data[0],packet->data[1],packet->data[2],packet->data[3]); DEBUG("[Net] connected, IP: %d.%d.%d.%d",packet->data[0],packet->data[1],packet->data[2],packet->data[3]);
}else if(packet->data[6] == ESP_NET_WIFI_EXCEPTION){ }else if(packet->data[6] == ESP_NET_WIFI_EXCEPTION){
DEBUG("[Net] wifi exeption"); DEBUG("[Net] wifi exeption");

Loading…
Cancel
Save