Skip to content

Commit 4ac71fe

Browse files
committed
esp32 compile
removed some analogwrite stuff , replace later
1 parent 548ee24 commit 4ac71fe

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

serialcmd.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ void process_command(){
150150
uint32_t arg = (uint32_t)atoi(cmd + 5);
151151
if(DEBUG_SERIALCMD) DebugOut.print(F("Set freq to: ") );
152152
if(DEBUG_SERIALCMD) DebugOut.println(arg);
153-
analogWriteFreq(arg); // confirm ?
153+
#ifdef ESP8266
154+
analogWriteFreq(arg); // confirm ?
155+
#endif
154156
}
155157

156158
if (strncmp(cmd,"A",1) == 0) {
@@ -215,7 +217,9 @@ void process_command(){
215217
uint32_t arg = (uint32_t)atoi(cmd + 3);
216218
if(DEBUG_SERIALCMD) DebugOut.print(F("[CMD] [ANALOG] duty:") );
217219
if(DEBUG_SERIALCMD) DebugOut.println((int)arg);
218-
analogWrite(16,(int)(arg));
220+
#ifdef ESP8266
221+
analogWrite(16,(int)(arg));
222+
#endif
219223
}
220224

221225
if (strncmp(cmd,"debugbox",8) == 0) {

ssr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ void SetSSRFrequency( int duty,int power =1)
4141

4242
// Write the clamped duty cycle to the RELAYPIN GPIO
4343
int out = invertDuty ? 255-duty : duty;
44+
#ifdef ESP8266P
4445
analogWrite( _ssrRelayPin, out);
45-
46+
#endif
4647
// if(duty == 0)digitalWrite(RELAYPIN,invertDuty ? LOW:HIGH);
4748
// if(duty == 255)digitalWrite(RELAYPIN,!invertDuty ? LOW:HIGH);
4849

telnet_cmd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#ifndef telnet_cmd_h
22
#define telnet_cmd_h
33

4+
#ifdef ESP8266
45
#include <ESP8266WiFi.h>
6+
#endif
57
#include <serialcmd.h>
68
#include <motor.h>
79

wifi_funcs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void init_WiFi(int timeout = 10000){
4444
Serial.print("[WIFI] IP: ");
4545
Serial.println(WiFi.localIP());
4646
Serial.print("[WIFI] HOST: ");
47-
Serial.println(WiFi.hostname());
47+
Serial.println(WiFi.getHostname());
4848
}
4949
else{
5050
Serial.println("[ERROR] WIFI CONNECT FAILED");

0 commit comments

Comments
 (0)