esp32 webcam support

This commit is contained in:
gemu2015 2020-05-02 08:10:23 +02:00
parent 99178c2f5d
commit a237297e8a
29 changed files with 1820 additions and 611 deletions

View File

@ -28,6 +28,9 @@
#include <Esp.h>
// webcam uses channel 0, so we offset standard PWM
#define PWM_CHANNEL_OFFSET 2
// Analog
uint8_t pwm_channel[8]={99,99,99,99,99,99,99,99};
@ -44,8 +47,8 @@ inline uint32_t pin2chan(uint32_t pin) {
inline void analogWrite(uint8_t pin, int val)
{
uint32_t channel=pin2chan(pin);
ledcWrite(channel,val);
Serial.printf("write %d - %d\n",channel,val);
ledcWrite(channel+PWM_CHANNEL_OFFSET,val);
//Serial.printf("write %d - %d\n",channel,val);
}
inline void analogWriteFreq(uint32_t freq)
@ -57,8 +60,8 @@ inline void analogWriteRange(uint32_t range)
inline void analogAttach(uint32_t pin, uint32_t channel) {
pwm_channel[channel&7]=pin;
ledcAttachPin(pin,channel);
Serial.printf("attach %d - %d\n",channel,pin);
ledcAttachPin(pin,channel+PWM_CHANNEL_OFFSET);
//Serial.printf("attach %d - %d\n",channel,pin);
}
inline uint32_t pow2(uint32_t x) {
@ -74,7 +77,7 @@ inline void analogWriteFreqRange(uint32_t channel,uint32_t freq, uint32_t irange
uint32_t range=pow2(irange);
for (uint32_t cnt=0;cnt<8;cnt++) {
if (pwm_channel[cnt]<99) {
ledcSetup(cnt,freq,range);
ledcSetup(cnt+PWM_CHANNEL_OFFSET,freq,range);
}
}
Serial.printf("freq - range %d - %d\n",freq,range);

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_BG_BG_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_CS_CZ_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,5 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload Dateien"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "Rauschpegel:"
#define D_AS3935_ENERGY "Energie:"
#define D_AS3935_DISTANCE "Entfernung:"
#define D_AS3935_DISTURBER "Störsingal:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "ca.:"
#define D_AS3935_AWAY "entfernt"
#define D_AS3935_LIGHT "Blitz"
#define D_AS3935_OUT "ausserhalb der Reichweite"
#define D_AS3935_NOT "Entfernung nicht ermittelbar"
#define D_AS3935_ABOVE "Blitz überhalb"
#define D_AS3935_NOISE "Rauschen entdeckt"
#define D_AS3935_DISTDET "Störer entdeckt"
#define D_AS3935_INTNOEV "Interrupt ohne Grund!"
#define D_AS3935_NOMESS "lausche..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "Kalibrierung fehlerhaft"
#define D_AS3935_CAL_OK "Cap gesetzt auf:"
#endif // _LANGUAGE_DE_DE_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_EL_GR_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_EN_GB_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Cargar"
#define D_SCRIPT_UPLOAD_FILES "Cargar Archivos"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_ES_ES_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_FR_FR_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_HE_HE_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_HU_HU_H_

View File

@ -567,8 +567,8 @@
#define D_SENSOR_SPI_MOSI "SPI - MOSI"
#define D_SENSOR_SPI_CLK "SPI - CLK"
#define D_SENSOR_BACKLIGHT "Retroilluminazione"
#define D_SENSOR_PMS5003_TX "PMS5003 - TX"
#define D_SENSOR_PMS5003_RX "PMS5003 - RX"
#define D_SENSOR_PMS5003_TX "PMS5003 Tx"
#define D_SENSOR_PMS5003_RX "PMS5003 Rx"
#define D_SENSOR_SDS0X1_RX "SDS0X1 - RX"
#define D_SENSOR_SDS0X1_TX "SDS0X1 - TX"
#define D_SENSOR_HPMA_RX "HPMA - RX"
@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL - TX"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload file"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_IT_IT_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_KO_KO_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_NL_NL_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_PL_PL_D_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_PT_BR_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_PT_PT_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Încarcă"
#define D_SCRIPT_UPLOAD_FILES "Încarcă fișiere"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_RO_RO_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "А"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_RU_RU_H_

View File

@ -667,7 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
// Units
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
#define D_UNIT_HERTZ "Hz"
@ -750,27 +771,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_SK_SK_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_SV_SE_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "A"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_TR_TR_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "А"
#define D_UNIT_CENTIMETER "cм"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Завантажити"
#define D_SCRIPT_UPLOAD_FILES "Завантажити файли"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_UK_UA_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "安"
#define D_UNIT_CENTIMETER "厘米"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_ZH_CN_H_

View File

@ -667,6 +667,28 @@
#define D_SENSOR_ELECTRIQ_MOODL "MOODL Tx"
#define D_SENSOR_AS3935 "AS3935"
#define D_GPIO_WEBCAM_PWDN_GPIO_NUM "CAM_PWDN"
#define D_GPIO_WEBCAM_RESET_GPIO_NUM "CAM_RESET"
#define D_GPIO_WEBCAM_XCLK_GPIO_NUM "CAM_XCLK"
#define D_GPIO_WEBCAM_SIOD_GPIO_NUM "CAM_SIOD"
#define D_GPIO_WEBCAM_SIOC_GPIO_NUM "CAM_SIOC"
#define D_GPIO_WEBCAM_Y9_GPIO_NUM "CAM_Y9"
#define D_GPIO_WEBCAM_Y8_GPIO_NUM "CAM_Y8"
#define D_GPIO_WEBCAM_Y7_GPIO_NUM "CAM_Y7"
#define D_GPIO_WEBCAM_Y6_GPIO_NUM "CAM_Y6"
#define D_GPIO_WEBCAM_Y5_GPIO_NUM "CAM_Y5"
#define D_GPIO_WEBCAM_Y4_GPIO_NUM "CAM_Y4"
#define D_GPIO_WEBCAM_Y3_GPIO_NUM "CAM_Y3"
#define D_GPIO_WEBCAM_Y2_GPIO_NUM "CAM_Y2"
#define D_GPIO_WEBCAM_VSYNC_GPIO_NUM "CAM_VSYNC"
#define D_GPIO_WEBCAM_HREF_GPIO_NUM "CAM_HREF"
#define D_GPIO_WEBCAM_PCLK_GPIO_NUM "CAM_PCLK"
#define D_GPIO_WEBCAM_PSCLK_GPIO_NUM "CAM_PSCLK"
#define D_GPIO_WEBCAM_HSD1_GPIO_NUM "CAM_HSD1"
#define D_GPIO_WEBCAM_HSD2_GPIO_NUM "CAM_HSD2"
#define D_GPIO_WEBCAM_HSD3_GPIO_NUM "CAM_HSD3"
#define D_GPIO_WEBCAM_PSRCS_GPIO_NUM "CAM_PSRCS"
// Units
#define D_UNIT_AMPERE "安"
#define D_UNIT_CENTIMETER "cm"
@ -750,27 +772,4 @@
#define D_SCRIPT_UPLOAD "Upload"
#define D_SCRIPT_UPLOAD_FILES "Upload files"
//xsns_67_as3935.ino
#define D_AS3935_GAIN "gain:"
#define D_AS3935_ENERGY "energy:"
#define D_AS3935_DISTANCE "distance:"
#define D_AS3935_DISTURBER "disturber:"
#define D_AS3935_VRMS "µVrms:"
#define D_AS3935_APRX "aprx.:"
#define D_AS3935_AWAY "away"
#define D_AS3935_LIGHT "lightning"
#define D_AS3935_OUT "lightning out of range"
#define D_AS3935_NOT "distance not determined"
#define D_AS3935_ABOVE "lightning overhead"
#define D_AS3935_NOISE "noise detected"
#define D_AS3935_DISTDET "disturber detected"
#define D_AS3935_INTNOEV "Interrupt with no Event!"
#define D_AS3935_NOMESS "listening..."
#define D_AS3935_ON "On"
#define D_AS3935_OFF "Off"
#define D_AS3935_INDOORS "Indoors"
#define D_AS3935_OUTDOORS "Outdoors"
#define D_AS3935_CAL_FAIL "calibration failed"
#define D_AS3935_CAL_OK "calibration set to:"
#endif // _LANGUAGE_ZH_TW_H_

View File

@ -41,6 +41,7 @@ class SendEmail
public:
SendEmail(const String& host, const int port, const String& user, const String& passwd, const int timeout, const int auth_used);
bool send(const String& from, const String& to, const String& subject, const char *msg);
void send_message_txt(char *msg);
~SendEmail() {client->stop(); delete client;}
};

View File

@ -1,5 +1,7 @@
#ifdef USE_SENDMAIL
#ifndef USE_ESP32MAIL
#include "sendemail.h"
// enable serial debugging
@ -26,6 +28,8 @@
#define SEND_MAIL_MINRAM 12*1024
#endif
void script_send_email_body(void(*func)(char *));
#define xPSTR(a) a
uint16_t SendMail(char *buffer) {
@ -47,7 +51,7 @@ uint16_t SendMail(char *buffer) {
// return if not enough memory
uint16_t mem=ESP_getFreeHeap();
uint16_t mem=ESP.getFreeHeap();
if (mem<SEND_MAIL_MINRAM) {
return 4;
}
@ -174,13 +178,15 @@ exit:
return status;
}
#ifdef ESP8266
void script_send_email_body(BearSSL::WiFiClientSecure_light *client);
WiFiClient *g_client;
SendEmail::SendEmail(const String& host, const int port, const String& user, const String& passwd, const int timeout, const int auth_used) :
host(host), port(port), user(user), passwd(passwd), timeout(timeout), ssl(ssl), auth_used(auth_used), client(new BearSSL::WiFiClientSecure_light(1024,1024)) {
}
#else
void script_send_email_body(WiFiClient *client);
WiFiClient *g_client;
SendEmail::SendEmail(const String& host, const int port, const String& user, const String& passwd, const int timeout, const int auth_used) :
host(host), port(port), user(user), passwd(passwd), timeout(timeout), ssl(ssl), auth_used(auth_used), client(new WiFiClientSecure()) {
}
@ -346,7 +352,8 @@ String buffer;
#ifdef USE_SCRIPT
if (*msg=='*' && *(msg+1)==0) {
script_send_email_body(client);
g_client=client;
script_send_email_body(xsend_message_txt);
} else {
client->println(msg);
}
@ -370,5 +377,289 @@ exit:
return status;
}
void xsend_message_txt(char *msg) {
g_client->println(msg);
}
#else
/*
* Created by K. Suwatchai (Mobizt)
*
* Email: k_suwatchai@hotmail.com
*
* Github: https://github.com/mobizt
*
* Copyright (c) 2019 mobizt
*
*/
//To use send Email for Gmail to port 465 (SSL), less secure app option should be enabled. https://myaccount.google.com/lesssecureapps?pli=1
//To receive Email for Gmail, IMAP option should be enabled. https://support.google.com/mail/answer/7126229?hl=en
#include "ESP32_MailClient.h"
#include "SD.h"
//For demo only
//#include "image.h"
#ifndef SEND_MAIL32_MINRAM
#define SEND_MAIL32_MINRAM 30*1024
#endif
void script_send_email_body(void(*func)(char *));
#define xPSTR(a) a
//The Email Sending data object contains config and data to send
SMTPData smtpData;
//Callback function to get the Email sending status
//void sendCallback(SendStatus info);
//#define DEBUG_EMAIL_PORT
uint16_t SendMail(char *buffer) {
char *params,*oparams;
const char *mserv;
uint16_t port;
const char *user;
const char *pstr;
const char *passwd;
const char *from;
const char *to;
const char *subject;
const char *cmd;
uint16_t status=1;
uint16_t blen;
char *endcmd;
// return if not enough memory
uint32_t mem=ESP.getFreeHeap();
AddLog_P2(LOG_LEVEL_INFO, PSTR("heap: %d"),mem);
if (mem<SEND_MAIL32_MINRAM) {
return 4;
}
while (*buffer==' ') buffer++;
if (*buffer!='[') {
goto exit;
}
buffer++;
endcmd=strchr(buffer,']');
if (!endcmd) {
goto exit;
}
// copy params
blen=(uint32_t)endcmd-(uint32_t)buffer;
oparams=(char*)calloc(blen+2,1);
if (!oparams) return 4;
params=oparams;
strncpy(oparams,buffer,blen+2);
oparams[blen]=0;
cmd=endcmd+1;
#ifdef DEBUG_EMAIL_PORT
AddLog_P2(LOG_LEVEL_INFO, PSTR("mailsize: %d"),blen);
#endif
mserv=strtok(params,":");
if (!mserv) {
goto exit;
}
// port
pstr=strtok(NULL,":");
if (!pstr) {
goto exit;
}
#ifdef EMAIL_PORT
if (*pstr=='*') {
port=EMAIL_PORT;
} else {
port=atoi(pstr);
}
#else
port=atoi(pstr);
#endif
user=strtok(NULL,":");
if (!user) {
goto exit;
}
passwd=strtok(NULL,":");
if (!passwd) {
goto exit;
}
from=strtok(NULL,":");
if (!from) {
goto exit;
}
to=strtok(NULL,":");
if (!to) {
goto exit;
}
subject=strtok(NULL,"]");
if (!subject) {
goto exit;
}
#ifdef EMAIL_USER
if (*user=='*') {
user=xPSTR(EMAIL_USER);
}
#endif
#ifdef EMAIL_PASSWORD
if (*passwd=='*') {
passwd=xPSTR(EMAIL_PASSWORD);
}
#endif
#ifdef EMAIL_SERVER
if (*mserv=='*') {
mserv=xPSTR(EMAIL_SERVER);
}
#endif
#ifdef DEBUG_EMAIL_PORT
AddLog_P2(LOG_LEVEL_INFO, PSTR("%s - %d - %s - %s"),mserv,port,user,passwd);
#endif
#ifdef EMAIL_FROM
if (*from=='*') {
from=xPSTR(EMAIL_FROM);
}
#endif
#ifdef DEBUG_EMAIL_PORT
AddLog_P2(LOG_LEVEL_INFO, PSTR("%s - %s - %s - %s"),from,to,subject,cmd);
#endif
smtpData.setDebug(true);
//Set the Email host, port, account and password
smtpData.setLogin(mserv, port, user, passwd);
//For library version 1.2.0 and later which STARTTLS protocol was supported,the STARTTLS will be
//enabled automatically when port 587 was used, or enable it manually using setSTARTTLS function.
//smtpData.setSTARTTLS(true);
//Set the sender name and Email
smtpData.setSender("ESP32",from);
//Set Email priority or importance High, Normal, Low or 1 to 5 (1 is highest)
smtpData.setPriority("High");
//Set the subject
smtpData.setSubject(subject);
#ifdef USE_SCRIPT
if (*cmd=='*' && *(cmd+1)==0) {
smtpData.clrMessage(true);
script_send_email_body(send_message_txt);
} else {
smtpData.setMessage(cmd, true);
}
#else
//Set the message - normal text or html format
smtpData.setMessage(cmd, true);
#endif
//Add recipients, can add more than one recipient
smtpData.addRecipient(to);
//Add attachments, can add the file or binary data from flash memory, file in SD card
//Data from internal memory
//smtpData.addAttachData("firebase_logo.png", "image/png", (uint8_t *)dummyImageData, sizeof dummyImageData);
//Add attach files from SD card
//Comment these two lines, if no SD card connected
//Two files that previousely created.
//smtpData.addAttachFile("/binary_file.dat");
//smtpData.addAttachFile("/text_file.txt");
//Add some custom header to message
//See https://tools.ietf.org/html/rfc822
//These header fields can be read from raw or source of message when it received)
//smtpData.addCustomMessageHeader("Date: Sat, 10 Aug 2019 21:39:56 -0700 (PDT)");
//Be careful when set Message-ID, it should be unique, otherwise message will not store
//smtpData.addCustomMessageHeader("Message-ID: <abcde.fghij@gmail.com>");
//Set the storage types to read the attach files (SD is default)
//smtpData.setFileStorageType(MailClientStorageType::SPIFFS);
#if defined (USE_SCRIPT) && defined(USE_SCRIPT_FATFS)
smtpData.setFileStorageType(MailClientStorageType::SD);
#endif
//smtpData.setSendCallback(sendCallback);
//Start sending Email, can be set callback function to track the status
if (!MailClient.sendMail(smtpData)) {
//Serial.println("Error sending Email, " + MailClient.smtpErrorReason());
AddLog_P2(LOG_LEVEL_INFO, PSTR("Error sending Email, %s"), MailClient.smtpErrorReason());
} else {
status=0;
}
//Clear all data from Email object to free memory
smtpData.empty();
exit:
if (oparams) free(oparams);
return status;
}
void send_message_txt(char *txt) {
if (*txt=='&') {
txt++;
smtpData.addAttachFile(txt);
} else if (*txt=='$') {
txt++;
#if defined(ESP32) && defined(USE_WEBCAM)
uint32_t cnt;
uint8_t *buff;
uint32_t len,picmax;
picmax=get_picstore(-1,0);
cnt=*txt&7;
if (cnt<1 || cnt>picmax) cnt=1;
len=get_picstore(cnt-1,&buff);
if (len) {
char str[12];
sprintf(str,"img_%1d.jpg",cnt+1);
smtpData.addAttachData(str, "image/jpg",buff,len);
}
#endif
} else {
smtpData.addMessage(txt);
}
}
/*
//Callback function to get the Email sending status
void sendCallback(SendStatus msg)
{
//Print the current status
Serial.println(msg.info());
//Do something when complete
if (msg.success())
{
Serial.println("----------------");
}
}
*/
#endif
#endif // USE_SENDMAIL

View File

@ -197,6 +197,28 @@ enum UserSelectablePins {
ADC0_BUTTON_INV,
ADC0_RANGE, // Range
ADC0_CT_POWER, // Current
// webcam interface
GPIO_WEBCAM_PWDN_GPIO_NUM,
GPIO_WEBCAM_RESET_GPIO_NUM,
GPIO_WEBCAM_XCLK_GPIO_NUM,
GPIO_WEBCAM_SIOD_GPIO_NUM,
GPIO_WEBCAM_SIOC_GPIO_NUM,
GPIO_WEBCAM_Y9_GPIO_NUM,
GPIO_WEBCAM_Y8_GPIO_NUM,
GPIO_WEBCAM_Y7_GPIO_NUM,
GPIO_WEBCAM_Y6_GPIO_NUM,
GPIO_WEBCAM_Y5_GPIO_NUM,
GPIO_WEBCAM_Y4_GPIO_NUM,
GPIO_WEBCAM_Y3_GPIO_NUM,
GPIO_WEBCAM_Y2_GPIO_NUM,
GPIO_WEBCAM_VSYNC_GPIO_NUM,
GPIO_WEBCAM_HREF_GPIO_NUM,
GPIO_WEBCAM_PCLK_GPIO_NUM,
GPIO_WEBCAM_PSCLK_GPIO_NUM,
GPIO_WEBCAM_HSD1_GPIO_NUM,
GPIO_WEBCAM_HSD2_GPIO_NUM,
GPIO_WEBCAM_HSD3_GPIO_NUM,
GPIO_WEBCAM_PSRCS_GPIO_NUM,
GPIO_SENSOR_END };
enum ProgramSelectablePins {
@ -287,6 +309,27 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_BUTTON "|" D_SENSOR_BUTTON "i|"
D_RANGE "|"
D_CT_POWER "|"
D_GPIO_WEBCAM_PWDN_GPIO_NUM "|"
D_GPIO_WEBCAM_RESET_GPIO_NUM "|"
D_GPIO_WEBCAM_XCLK_GPIO_NUM "|"
D_GPIO_WEBCAM_SIOD_GPIO_NUM "|"
D_GPIO_WEBCAM_SIOC_GPIO_NUM "|"
D_GPIO_WEBCAM_Y9_GPIO_NUM "|"
D_GPIO_WEBCAM_Y8_GPIO_NUM "|"
D_GPIO_WEBCAM_Y7_GPIO_NUM "|"
D_GPIO_WEBCAM_Y6_GPIO_NUM "|"
D_GPIO_WEBCAM_Y5_GPIO_NUM "|"
D_GPIO_WEBCAM_Y4_GPIO_NUM "|"
D_GPIO_WEBCAM_Y3_GPIO_NUM "|"
D_GPIO_WEBCAM_Y2_GPIO_NUM "|"
D_GPIO_WEBCAM_VSYNC_GPIO_NUM "|"
D_GPIO_WEBCAM_HREF_GPIO_NUM "|"
D_GPIO_WEBCAM_PCLK_GPIO_NUM "|"
D_GPIO_WEBCAM_PSCLK_GPIO_NUM "|"
D_GPIO_WEBCAM_HSD1_GPIO_NUM "|"
D_GPIO_WEBCAM_HSD2_GPIO_NUM "|"
D_GPIO_WEBCAM_HSD3_GPIO_NUM "|"
D_GPIO_WEBCAM_PSRCS_GPIO_NUM
;
const char kSensorNamesFixed[] PROGMEM =
@ -589,6 +632,29 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(ADC0_CT_POWER), // Current
#endif
*/
#if defined(ESP32) && defined(USE_WEBCAM)
AGPIO(GPIO_WEBCAM_PWDN_GPIO_NUM),
AGPIO(GPIO_WEBCAM_RESET_GPIO_NUM),
AGPIO(GPIO_WEBCAM_XCLK_GPIO_NUM),
AGPIO(GPIO_WEBCAM_SIOD_GPIO_NUM),
AGPIO(GPIO_WEBCAM_SIOC_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y9_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y8_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y7_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y6_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y5_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y4_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y3_GPIO_NUM),
AGPIO(GPIO_WEBCAM_Y2_GPIO_NUM),
AGPIO(GPIO_WEBCAM_VSYNC_GPIO_NUM),
AGPIO(GPIO_WEBCAM_HREF_GPIO_NUM),
AGPIO(GPIO_WEBCAM_PCLK_GPIO_NUM),
AGPIO(GPIO_WEBCAM_PSCLK_GPIO_NUM),
AGPIO(GPIO_WEBCAM_HSD1_GPIO_NUM),
AGPIO(GPIO_WEBCAM_HSD2_GPIO_NUM),
AGPIO(GPIO_WEBCAM_HSD3_GPIO_NUM),
AGPIO(GPIO_WEBCAM_PSRCS_GPIO_NUM),
#endif
};
//********************************************************************************************

View File

@ -62,6 +62,7 @@ keywords if then else endif, or, and are better readable for beginners (others m
#define MAX_SCRIPT_SIZE MAX_RULE_SIZE*MAX_RULE_SETS
uint32_t EncodeLightId(uint8_t relay_id);
uint32_t DecodeLightId(uint32_t hue_id);
@ -102,14 +103,36 @@ enum {SCRIPT_LOGLEVEL=1,SCRIPT_TELEPERIOD};
#ifdef USE_SCRIPT_FATFS
#include <SPI.h>
//#define USE_MMC
#ifdef USE_MMC
#include <SD_MMC.h>
#undef FS_USED
#define FS_USED SD_MMC
#else
#include <SD.h>
#undef FS_USED
#define FS_USED SD
#endif
#ifndef ESP32
#undef FILE_WRITE
#define FILE_WRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT)
#define FILE_APPEND (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_APPEND)
#endif
#ifndef FAT_SCRIPT_SIZE
#define FAT_SCRIPT_SIZE 4096
#endif
#ifdef ESP32
#undef FAT_SCRIPT_NAME
#define FAT_SCRIPT_NAME "/script.txt"
#else
#undef FAT_SCRIPT_NAME
#define FAT_SCRIPT_NAME "script.txt"
#if USE_LONG_FILE_NAMES==1
#warning ("FATFS long filenames not supported");
#endif
#if USE_STANDARD_SPI_LIBRARY==0
#warning ("FATFS standard spi should be used");
#endif
@ -266,7 +289,6 @@ void RulesTeleperiod(void) {
#define EEP_SCRIPT_SIZE 4095
#endif
static Eeprom24C128_256 eeprom(EEPROM_ADDRESS);
// eeprom.writeBytes(address, length, buffer);
#define EEP_WRITE(A,B,C) eeprom.writeBytes(A,B,(uint8_t*)C);
@ -588,7 +610,11 @@ char *script;
#ifdef USE_SCRIPT_FATFS
if (!glob_script_mem.script_sd_found) {
if (SD.begin(USE_SCRIPT_FATFS)) {
#ifdef USE_MMC
if (FS_USED.begin()) {
#else
if (FS_USED.begin(USE_SCRIPT_FATFS)) {
#endif
glob_script_mem.script_sd_found=1;
} else {
glob_script_mem.script_sd_found=0;
@ -1166,20 +1192,36 @@ chknext:
goto exit;
}
break;
#ifdef USE_SCRIPT_FATFS
case 'f':
#ifdef USE_SCRIPT_FATFS
if (!strncmp(vname,"fo(",3)) {
lp+=3;
char str[SCRIPT_MAXSSIZE];
lp=GetStringResult(lp,OPER_EQU,str,0);
while (*lp==' ') lp++;
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
uint8_t mode=fvar;
uint8_t mode=0;
if ((*lp=='r') || (*lp=='w') || (*lp=='a')) {
switch (*lp) {
case 'r':
mode=0;
break;
case 'w':
mode=1;
break;
case 'a':
mode=2;
break;
}
lp++;
} else {
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
mode=fvar;
}
fvar=-1;
for (uint8_t cnt=0;cnt<SFS_MAX;cnt++) {
if (!glob_script_mem.file_flags[cnt].is_open) {
if (mode==0) {
glob_script_mem.files[cnt]=SD.open(str,FILE_READ);
glob_script_mem.files[cnt]=FS_USED.open(str,FILE_READ);
if (glob_script_mem.files[cnt].isDirectory()) {
glob_script_mem.files[cnt].rewindDirectory();
glob_script_mem.file_flags[cnt].is_dir=1;
@ -1187,7 +1229,13 @@ chknext:
glob_script_mem.file_flags[cnt].is_dir=0;
}
}
else glob_script_mem.files[cnt]=SD.open(str,FILE_WRITE);
else {
if (mode==1) {
glob_script_mem.files[cnt]=FS_USED.open(str,FILE_WRITE);
} else {
glob_script_mem.files[cnt]=FS_USED.open(str,FILE_APPEND);
}
}
if (glob_script_mem.files[cnt]) {
fvar=cnt;
glob_script_mem.file_flags[cnt].is_open=1;
@ -1275,7 +1323,13 @@ chknext:
File entry=glob_script_mem.files[find].openNextFile();
if (entry) {
if (!reject((char*)entry.name())) {
strcpy(str,entry.name());
char *ep=(char*)entry.name();
if (*ep=='/') ep++;
char *lcp = strrchr(ep,'/');
if (lcp) {
ep=lcp+1;
}
strcpy(str,ep);
entry.close();
break;
}
@ -1313,18 +1367,47 @@ chknext:
lp+=3;
char str[glob_script_mem.max_ssize+1];
lp=GetStringResult(lp,OPER_EQU,str,0);
SD.remove(str);
FS_USED.remove(str);
lp++;
len=0;
goto exit;
}
#if defined(ESP32) && defined(USE_WEBCAM)
if (!strncmp(vname,"fwp(",4)) {
lp+=4;
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
while (*lp==' ') lp++;
float fvar1;
lp=GetNumericResult(lp,OPER_EQU,&fvar1,0);
uint8_t ind=fvar1;
if (ind>=SFS_MAX) ind=SFS_MAX-1;
if (glob_script_mem.file_flags[ind].is_open) {
uint8_t *buff;
float maxps=get_picstore(-1,0);
if (fvar<1 || fvar>maxps) fvar=1;
uint32_t len=get_picstore(fvar-1, &buff);
if (len) {
//glob_script_mem.files[ind].seek(0,SeekEnd);
fvar=glob_script_mem.files[ind].write(buff,len);
} else {
fvar=0;
}
//AddLog_P2(LOG_LEVEL_INFO, PSTR("picture save: %d"), len);
} else {
fvar=0;
}
lp++;
len=0;
goto exit;
}
#endif
#ifdef USE_SCRIPT_FATFS_EXT
if (!strncmp(vname,"fe(",3)) {
lp+=3;
char str[glob_script_mem.max_ssize+1];
lp=GetStringResult(lp,OPER_EQU,str,0);
// execute script
File ef=SD.open(str);
File ef=FS_USED.open(str);
if (ef) {
uint16_t fsiz=ef.size();
if (fsiz<2048) {
@ -1346,7 +1429,7 @@ chknext:
lp+=4;
char str[glob_script_mem.max_ssize+1];
lp=GetStringResult(lp,OPER_EQU,str,0);
fvar=SD.mkdir(str);
fvar=FS_USED.mkdir(str);
lp++;
len=0;
goto exit;
@ -1355,7 +1438,7 @@ chknext:
lp+=4;
char str[glob_script_mem.max_ssize+1];
lp=GetStringResult(lp,OPER_EQU,str,0);
fvar=SD.rmdir(str);
fvar=FS_USED.rmdir(str);
lp++;
len=0;
goto exit;
@ -1364,13 +1447,13 @@ chknext:
lp+=3;
char str[glob_script_mem.max_ssize+1];
lp=GetStringResult(lp,OPER_EQU,str,0);
if (SD.exists(str)) fvar=1;
if (FS_USED.exists(str)) fvar=1;
else fvar=0;
lp++;
len=0;
goto exit;
}
#endif
#endif // USE_SCRIPT_FATFS_EXT
if (!strncmp(vname,"fl1(",4) || !strncmp(vname,"fl2(",4) ) {
uint8_t lknum=*(lp+2)&3;
lp+=4;
@ -1388,9 +1471,16 @@ chknext:
//card_init();
goto exit;
}
break;
#endif //USE_SCRIPT_FATFS
if (!strncmp(vname,"freq",4)) {
#ifdef ESP32
fvar=getCpuFrequencyMhz();
#else
fvar=ESP.getCpuFreqMHz();
#endif
goto exit;
}
break;
case 'g':
if (!strncmp(vname,"gtmp",4)) {
fvar=global_temperature;
@ -1573,6 +1663,13 @@ chknext:
}
if (!strncmp(vname,"pn[",3)) {
GetNumericResult(vname+3,OPER_EQU,&fvar,0);
fvar=Pin(fvar);
// skip ] bracket
len++;
goto exit;
}
if (!strncmp(vname,"pn[",3)) {
GetNumericResult(vname+3,OPER_EQU,&fvar,0);
// fvar=pin_gpio[(uint8_t)fvar];
fvar=Pin(fvar);
// skip ] bracket
@ -1790,7 +1887,7 @@ chknext:
goto exit;
}
#endif
#ifdef USE_SML_SCRIPT_CMD
#if defined(USE_SML_M) && defined (USE_SML_SCRIPT_CMD)
if (!strncmp(vname,"sml(",4)) {
lp+=4;
float fvar1;
@ -1902,6 +1999,60 @@ chknext:
break;
case 'w':
#if defined(ESP32) && defined(USE_WEBCAM)
if (!strncmp(vname,"wc(",3)) {
lp+=3;
float fvar1;
lp=GetNumericResult(lp,OPER_EQU,&fvar1,0);
SCRIPT_SKIP_SPACES
switch ((uint32)fvar1) {
case 0:
{ float fvar2;
lp=GetNumericResult(lp,OPER_EQU,&fvar2,0);
fvar=wc_setup(fvar2);
}
break;
case 1:
{ float fvar2;
lp=GetNumericResult(lp,OPER_EQU,&fvar2,0);
fvar=wc_get_frame(fvar2);
}
break;
case 2:
{ float fvar2,fvar3;
lp=GetNumericResult(lp,OPER_EQU,&fvar2,0);
SCRIPT_SKIP_SPACES
lp=GetNumericResult(lp,OPER_EQU,&fvar3,0);
fvar=wc_set_options(fvar2,fvar3);
}
break;
case 3:
fvar=wc_get_width();
break;
case 4:
fvar=wc_get_height();
break;
case 5:
{ float fvar2;
lp=GetNumericResult(lp,OPER_EQU,&fvar2,0);
fvar=wc_set_streamserver(fvar2);
}
break;
case 6:
{ float fvar2;
lp=GetNumericResult(lp,OPER_EQU,&fvar2,0);
fvar=wc_set_motion_detect(fvar2);
}
break;
default:
fvar=0;
}
lp++;
len=0;
goto exit;
}
#endif
if (!strncmp(vname,"wday",4)) {
fvar=RtcTime.day_of_week;
goto exit;
@ -2722,9 +2873,29 @@ int16_t Run_Scripter(const char *type, int8_t tlen, char *js) {
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
int8_t pinnr=fvar;
SCRIPT_SKIP_SPACES
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
int8_t mode=fvar;
pinMode(pinnr,mode&3);
uint8_t mode=0;
if ((*lp=='I') || (*lp=='O') || (*lp=='P')) {
switch (*lp) {
case 'I':
mode=0;
break;
case 'O':
mode=1;
break;
case 'P':
mode=2;
break;
}
lp++;
} else {
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
mode=fvar;
}
uint8_t pm=0;
if (mode==0) pm=INPUT;
if (mode==1) pm=OUTPUT;
if (mode==2) pm=INPUT_PULLUP;
pinMode(pinnr,pm);
goto next_line;
} else if (!strncmp(lp,"spin(",5)) {
lp+=5;
@ -2763,6 +2934,21 @@ int16_t Run_Scripter(const char *type, int8_t tlen, char *js) {
goto next_line;
}
#endif
#endif
#ifdef ESP32
else if (!strncmp(lp,"beep(",5)) {
lp+=5;
lp=GetNumericResult(lp,OPER_EQU,&fvar,0);
if (fvar<0) {
ledcSetup(7,500,10);
ledcAttachPin(-fvar,7);
ledcWriteTone(7,0);
} else {
ledcWriteTone(7,fvar);
}
lp++;
goto next_line;
}
#endif
else if (!strncmp(lp,"=>",2) || !strncmp(lp,"->",2) || !strncmp(lp,"+>",2) || !strncmp(lp,"print",5)) {
@ -3274,7 +3460,7 @@ const char HTTP_FORM_FILE_UPGb[] PROGMEM =
const char HTTP_FORM_SDC_DIRa[] PROGMEM =
"<div style='text-align:left'>";
const char HTTP_FORM_SDC_DIRb[] PROGMEM =
"<pre><a href='%s' file='%s'>%s</a> %d</pre>";
"<pre><a href='%s' file='%s'>%s</a> %s : %8d</pre>";
const char HTTP_FORM_SDC_DIRd[] PROGMEM =
"<pre><a href='%s' file='%s'>%s</a></pre>";
const char HTTP_FORM_SDC_DIRc[] PROGMEM =
@ -3297,6 +3483,7 @@ const char HTTP_FORM_SDC_HREF[] PROGMEM =
uint8_t reject(char *name) {
while (*name=='/') name++;
if (*name=='_') return 1;
if (*name=='.') return 1;
@ -3311,6 +3498,8 @@ uint8_t reject(char *name) {
if (!strcasecmp(name,"FSEVEN~1")) return 1;
if (!strcasecmp(name,"SYSTEM~1")) return 1;
#endif
if (!strncasecmp(name,"System Volume",13)) return 1;
return 0;
}
@ -3320,7 +3509,7 @@ void ListDir(char *path, uint8_t depth) {
char format[12];
sprintf(format,"%%-%ds",24-depth);
File dir=SD.open(path);
File dir=FS_USED.open(path);
if (dir) {
dir.rewindDirectory();
if (strlen(path)>1) {
@ -3334,35 +3523,48 @@ void ListDir(char *path, uint8_t depth) {
}
WSContentSend_P(HTTP_FORM_SDC_DIRd,npath,path,"..");
}
char *ep;
while (true) {
File entry=dir.openNextFile();
if (!entry) {
break;
}
// esp32 returns path here, shorten to filename
ep=(char*)entry.name();
if (*ep=='/') ep++;
char *lcp = strrchr(ep,'/');
if (lcp) {
ep=lcp+1;
}
//AddLog_P2(LOG_LEVEL_INFO, PSTR("entry: %s"),ep);
time_t tm=entry.getLastWrite();
char tstr[24];
strftime(tstr, 22, "%d-%m-%Y - %H:%M:%S ", localtime(&tm));
char *pp=path;
if (!*(pp+1)) pp++;
char *cp=name;
// osx formatted disks contain a lot of stuff we dont want
if (reject((char*)entry.name())) goto fclose;
if (reject((char*)ep)) goto fclose;
for (uint8_t cnt=0;cnt<depth;cnt++) {
*cp++='-';
}
// unfortunately no time date info in class File
sprintf(cp,format,entry.name());
sprintf(cp,format,ep);
if (entry.isDirectory()) {
snprintf_P(npath,sizeof(npath),HTTP_FORM_SDC_HREF,WiFi.localIP().toString().c_str(),pp,entry.name());
WSContentSend_P(HTTP_FORM_SDC_DIRd,npath,entry.name(),name);
snprintf_P(npath,sizeof(npath),HTTP_FORM_SDC_HREF,WiFi.localIP().toString().c_str(),pp,ep);
WSContentSend_P(HTTP_FORM_SDC_DIRd,npath,ep,name);
uint8_t plen=strlen(path);
if (plen>1) {
strcat(path,"/");
}
strcat(path,entry.name());
strcat(path,ep);
ListDir(path,depth+4);
path[plen]=0;
} else {
snprintf_P(npath,sizeof(npath),HTTP_FORM_SDC_HREF,WiFi.localIP().toString().c_str(),pp,entry.name());
WSContentSend_P(HTTP_FORM_SDC_DIRb,npath,entry.name(),name,entry.size());
snprintf_P(npath,sizeof(npath),HTTP_FORM_SDC_HREF,WiFi.localIP().toString().c_str(),pp,ep);
WSContentSend_P(HTTP_FORM_SDC_DIRb,npath,ep,name,tstr,entry.size());
}
fclose:
entry.close();
@ -3429,8 +3631,8 @@ void script_upload(void) {
if (upload.status == UPLOAD_FILE_START) {
char npath[48];
sprintf(npath,"%s/%s",path,upload.filename.c_str());
SD.remove(npath);
upload_file=SD.open(npath,FILE_WRITE);
FS_USED.remove(npath);
upload_file=FS_USED.open(npath,FILE_WRITE);
if (!upload_file) Web.upload_error=1;
} else if(upload.status == UPLOAD_FILE_WRITE) {
if (upload_file) upload_file.write(upload.buf,upload.currentSize);
@ -3449,12 +3651,12 @@ uint8_t DownloadFile(char *file) {
File download_file;
WiFiClient download_Client;
if (!SD.exists(file)) {
if (!FS_USED.exists(file)) {
AddLog_P(LOG_LEVEL_INFO,PSTR("file not found"));
return 0;
}
download_file=SD.open(file,FILE_READ);
download_file=FS_USED.open(file,FILE_READ);
if (!download_file) {
AddLog_P(LOG_LEVEL_INFO,PSTR("could not open file"));
return 0;
@ -3518,6 +3720,7 @@ void HandleScriptTextareaConfiguration(void) {
}
}
void HandleScriptConfiguration(void) {
if (!HttpCheckPriviledgedAccess()) { return; }
@ -3619,19 +3822,17 @@ void ScriptSaveSettings(void) {
strlcpy(glob_script_mem.script_ram,str.c_str(), glob_script_mem.script_size);
#ifdef USE_24C256
#ifndef USE_SCRIPT_FATFS
#if defined(USE_24C256) && !defined(USE_SCRIPT_FATFS)
if (glob_script_mem.flags&1) {
EEP_WRITE(0,EEP_SCRIPT_SIZE,glob_script_mem.script_ram);
}
#endif
#endif
#ifdef USE_SCRIPT_FATFS
#if !defined(USE_24C256) && defined(USE_SCRIPT_FATFS)
if (glob_script_mem.flags&1) {
SD.remove(FAT_SCRIPT_NAME);
File file=SD.open(FAT_SCRIPT_NAME,FILE_WRITE);
file.write(glob_script_mem.script_ram,FAT_SCRIPT_SIZE);
FS_USED.remove(FAT_SCRIPT_NAME);
File file=FS_USED.open(FAT_SCRIPT_NAME,FILE_WRITE);
file.write((const uint8_t*)glob_script_mem.script_ram,FAT_SCRIPT_SIZE);
file.close();
}
#endif
@ -4278,6 +4479,14 @@ void dateTime(uint16_t* date, uint16_t* time) {
#ifdef SUPPORT_MQTT_EVENT
#ifndef MQTT_EVENT_MSIZE
#define MQTT_EVENT_MSIZE 256
#endif
#ifndef MQTT_EVENT_JSIZE
#define MQTT_EVENT_JSIZE 400
#endif
/********************************************************************************************/
/*
* Script: Process received MQTT message.
@ -4292,8 +4501,8 @@ bool ScriptMqttData(void)
{
bool serviced = false;
//toLog(">>> 1");
toLog(XdrvMailbox.data);
if (XdrvMailbox.data_len < 1 || XdrvMailbox.data_len > 256) {
//toLog(XdrvMailbox.data);
if (XdrvMailbox.data_len < 1 || XdrvMailbox.data_len > MQTT_EVENT_MSIZE) {
return false;
}
String sTopic = XdrvMailbox.topic;
@ -4313,7 +4522,7 @@ bool ScriptMqttData(void)
if (event_item.Key.length() == 0) { //If did not specify Key
value = sData;
} else { //If specified Key, need to parse Key/Value from JSON data
StaticJsonBuffer<400> jsonBuf;
StaticJsonBuffer<MQTT_EVENT_JSIZE> jsonBuf;
JsonObject& jsonData = jsonBuf.parseObject(sData);
String key1 = event_item.Key;
String key2;
@ -4557,7 +4766,7 @@ uint32_t cnt;
nbuf[cnt]=0;
}
void ScriptWebShow(void) {
void ScriptWebShow(char mc) {
uint8_t web_script=Run_Scripter(">W",-2,0);
if (web_script==99) {
char line[128];
@ -4584,12 +4793,16 @@ void ScriptWebShow(void) {
cp++;
}
char *lin=line;
if (!mc && (*lin!='&')) {
if (*lin=='@') {
lin++;
optflg=1;
} else {
optflg=0;
}
// check for input elements
if (!strncmp(lin,"sl(",3)) {
// insert slider sl(min max var left mid right)
@ -4749,6 +4962,12 @@ void ScriptWebShow(void) {
WSContentSend_PD(PSTR("{s}%s{e}"),tmp);
}
}
} else {
if (*lin==mc) {
Replace_Cmd_Vars(lin+1,tmp,sizeof(tmp));
WSContentSend_PD(PSTR("%s"),tmp);
}
}
}
if (*lp==SCRIPT_EOL) {
lp++;
@ -4765,12 +4984,7 @@ void ScriptWebShow(void) {
#ifdef USE_SENDMAIL
#ifdef ESP8266
void script_send_email_body(BearSSL::WiFiClientSecure_light *client) {
#else
void script_send_email_body(WiFiClient *client) {
#endif
void script_send_email_body(void(*func)(char *)) {
uint8_t msect=Run_Scripter(">m",-2,0);
if (msect==99) {
char line[128];
@ -4796,7 +5010,8 @@ uint8_t msect=Run_Scripter(">m",-2,0);
cp++;
}
Replace_Cmd_Vars(line,tmp,sizeof(tmp));
client->println(tmp);
//client->println(tmp);
func(tmp);
}
if (*lp==SCRIPT_EOL) {
lp++;
@ -4807,7 +5022,8 @@ uint8_t msect=Run_Scripter(">m",-2,0);
}
}
} else {
client->println("*");
//client->println("*");
func((char*)"*");
}
}
#endif
@ -4868,14 +5084,8 @@ bool Xdrv10(uint8_t function)
switch (function) {
case FUNC_PRE_INIT:
/*
#ifdef USE_WEBCAM
if (Settings.module==ESP32_CAM_AITHINKER) {
webcam_setup();
}
#endif
*/
// set defaults to rules memory
//bitWrite(Settings.rule_enabled,0,0);
glob_script_mem.script_ram=Settings.rules[0];
glob_script_mem.script_size=MAX_SCRIPT_SIZE;
glob_script_mem.flags=0;
@ -4915,15 +5125,29 @@ bool Xdrv10(uint8_t function)
#endif
#ifdef USE_SCRIPT_FATFS
if (SD.begin(USE_SCRIPT_FATFS)) {
#ifdef USE_MMC
if (FS_USED.begin()) {
#else
#ifdef ESP32
if (PinUsed(GPIO_SPI_MOSI) && PinUsed(GPIO_SPI_MISO) && PinUsed(GPIO_SPI_CLK)) {
SPI.begin(Pin(GPIO_SPI_CLK),Pin(GPIO_SPI_MISO),Pin(GPIO_SPI_MOSI), -1);
}
#endif
if (FS_USED.begin(USE_SCRIPT_FATFS)) {
#endif
//FS_USED.dateTimeCallback(dateTime);
glob_script_mem.script_sd_found=1;
char *script;
script=(char*)calloc(FAT_SCRIPT_SIZE+4,1);
if (!script) break;
glob_script_mem.script_ram=script;
glob_script_mem.script_size=FAT_SCRIPT_SIZE;
if (SD.exists(FAT_SCRIPT_NAME)) {
File file=SD.open(FAT_SCRIPT_NAME,FILE_READ);
if (FS_USED.exists(FAT_SCRIPT_NAME)) {
File file=FS_USED.open(FAT_SCRIPT_NAME,FILE_READ);
file.read((uint8_t*)script,FAT_SCRIPT_SIZE);
file.close();
}
@ -4934,11 +5158,6 @@ bool Xdrv10(uint8_t function)
glob_script_mem.flags=1;
#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
// for unkonwn reasons is not defined in 2.52
SdFile::dateTimeCallback(dateTime);
#endif
} else {
glob_script_mem.script_sd_found=0;
}
@ -5001,6 +5220,10 @@ bool Xdrv10(uint8_t function)
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_RULES);
break;
case FUNC_WEB_ADD_MAIN_BUTTON:
ScriptWebShow('&');
break;
case FUNC_WEB_ADD_HANDLER:
Webserver->on("/" WEB_HANDLE_SCRIPT, HandleScriptConfiguration);
Webserver->on("/ta",HTTP_POST, HandleScriptTextareaConfiguration);
@ -5028,7 +5251,7 @@ bool Xdrv10(uint8_t function)
#ifdef USE_SCRIPT_WEB_DISPLAY
case FUNC_WEB_SENSOR:
if (bitRead(Settings.rule_enabled, 0)) {
ScriptWebShow();
ScriptWebShow(0);
}
break;
#endif //USE_SCRIPT_WEB_DISPLAY

648
tasmota/xdrv_39_webcam.ino Normal file
View File

@ -0,0 +1,648 @@
#if defined(ESP32) && defined(USE_WEBCAM)
#define XDRV_39 39
#define CAMERA_MODEL_AI_THINKER
//#define USE_TEMPLATE
#define WC_LOGLEVEL LOG_LEVEL_INFO
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
#include "esp_camera.h"
#include "sensor.h"
uint8_t wc_up;
uint16_t wc_width;
uint16_t wc_height;
uint8_t wc_stream_active;
uint32_t wc_setup(int32_t fsiz) {
bool psram;
if (fsiz>10) fsiz=10;
wc_stream_active=0;
if (fsiz<0) {
esp_camera_deinit();
return 0;
}
if (wc_up) {
esp_camera_deinit();
//return wc_up;
}
//esp_log_level_set("*", ESP_LOG_VERBOSE);
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
// config.pixel_format = PIXFORMAT_GRAYSCALE;
// config.pixel_format = PIXFORMAT_RGB565;
#ifndef USE_TEMPLATE
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
#else
if (PinUsed(GPIO_WEBCAM_Y2_GPIO_NUM) && PinUsed(GPIO_WEBCAM_Y3_GPIO_NUM) && PinUsed(GPIO_WEBCAM_Y4_GPIO_NUM) && PinUsed(GPIO_WEBCAM_Y5_GPIO_NUM)\
&& PinUsed(GPIO_WEBCAM_Y6_GPIO_NUM) && PinUsed(GPIO_WEBCAM_Y7_GPIO_NUM) && PinUsed(GPIO_WEBCAM_Y8_GPIO_NUM) && PinUsed(GPIO_WEBCAM_Y9_GPIO_NUM)\
&& PinUsed(GPIO_WEBCAM_XCLK_GPIO_NUM) && PinUsed(GPIO_WEBCAM_PCLK_GPIO_NUM) && PinUsed(GPIO_WEBCAM_VSYNC_GPIO_NUM) && PinUsed(GPIO_WEBCAM_HREF_GPIO_NUM)\
&& PinUsed(GPIO_WEBCAM_SIOD_GPIO_NUM) && PinUsed(GPIO_WEBCAM_SIOC_GPIO_NUM)) {
config.pin_d0 = Pin(GPIO_WEBCAM_Y2_GPIO_NUM); //Y2_GPIO_NUM;
config.pin_d1 = Pin(GPIO_WEBCAM_Y3_GPIO_NUM); //Y3_GPIO_NUM;
config.pin_d2 = Pin(GPIO_WEBCAM_Y4_GPIO_NUM); //Y4_GPIO_NUM;
config.pin_d3 = Pin(GPIO_WEBCAM_Y5_GPIO_NUM); //Y5_GPIO_NUM;
config.pin_d4 = Pin(GPIO_WEBCAM_Y6_GPIO_NUM); //Y6_GPIO_NUM;
config.pin_d5 = Pin(GPIO_WEBCAM_Y7_GPIO_NUM); //Y7_GPIO_NUM;
config.pin_d6 = Pin(GPIO_WEBCAM_Y8_GPIO_NUM); //Y8_GPIO_NUM;
config.pin_d7 = Pin(GPIO_WEBCAM_Y9_GPIO_NUM); //Y9_GPIO_NUM;
config.pin_xclk = Pin(GPIO_WEBCAM_XCLK_GPIO_NUM); //XCLK_GPIO_NUM;
config.pin_pclk = Pin(GPIO_WEBCAM_PCLK_GPIO_NUM); //PCLK_GPIO_NUM;
config.pin_vsync = Pin(GPIO_WEBCAM_VSYNC_GPIO_NUM); //VSYNC_GPIO_NUM;
config.pin_href = Pin(GPIO_WEBCAM_HREF_GPIO_NUM); //HREF_GPIO_NUM;
config.pin_sscb_sda = Pin(GPIO_WEBCAM_SIOD_GPIO_NUM); //SIOD_GPIO_NUM;
config.pin_sscb_scl = Pin(GPIO_WEBCAM_SIOC_GPIO_NUM); //SIOC_GPIO_NUM;
int16_t xpin;
xpin=Pin(GPIO_WEBCAM_PWDN_GPIO_NUM);
if (xpin==99) xpin=-1;
config.pin_pwdn = xpin; //PWDN_GPIO_NUM;
xpin=Pin(GPIO_WEBCAM_RESET_GPIO_NUM);
if (xpin==99) xpin=-1;
config.pin_reset = xpin; //RESET_GPIO_NUM;
} else {
// defaults to AI THINKER
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
}
#endif
//ESP.getPsramSize()
//esp_log_level_set("*", ESP_LOG_INFO);
// if PSRAM IC present, init with UXGA resolution and higher JPEG quality
// for larger pre-allocated frame buffer.
psram=psramFound();
if (psram) {
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10;
config.fb_count = 2;
AddLog_P(WC_LOGLEVEL,"PSRAM found!");
} else {
config.frame_size = FRAMESIZE_VGA;
config.jpeg_quality = 12;
config.fb_count = 1;
AddLog_P(WC_LOGLEVEL,"PSRAM not found!");
}
// stupid workaround camera diver eats up static ram should prefer PSRAM
// so we steal static ram to force driver to alloc PSRAM
//ESP.getMaxAllocHeap()
// void *x=malloc(70000);
void *x=0;
esp_err_t err = esp_camera_init(&config);
if (x) free(x);
if (err != ESP_OK) {
AddLog_P2(WC_LOGLEVEL,"Camera init failed with error 0x%x", err);
return 0;
}
sensor_t * wc_s = esp_camera_sensor_get();
// initial sensors are flipped vertically and colors are a bit saturated
if (wc_s->id.PID == OV3660_PID) {
wc_s->set_vflip(wc_s, 1); // flip it back
wc_s->set_brightness(wc_s, 1); // up the brightness just a bit
wc_s->set_saturation(wc_s, -2); // lower the saturation
}
// drop down frame size for higher initial frame rate
wc_s->set_framesize(wc_s, (framesize_t)fsiz);
camera_fb_t *wc_fb = esp_camera_fb_get();
wc_width=wc_fb->width;
wc_height=wc_fb->height;
esp_camera_fb_return(wc_fb);
AddLog_P(WC_LOGLEVEL,"Camera successfully initialized!");
wc_up=1;
if (psram) {
wc_up=2;
}
return wc_up;
}
int32_t wc_set_options(uint32_t sel,int32_t value) {
int32_t res=0;
sensor_t *s = esp_camera_sensor_get();
if (!s) return -99;
switch (sel) {
case 0:
if (value>=0) s->set_framesize(s,(framesize_t)value);
res = s->status.framesize;
break;
case 1:
if (value>=0) s->set_special_effect(s,value);
res = s->status.special_effect;
break;
case 2:
if (value>=0) s->set_vflip(s,value);
res = s->status.vflip;
break;
case 3:
if (value>=0) s->set_hmirror(s,value);
res = s->status.hmirror;
break;
case 4:
if (value>=-4) s->set_contrast(s,value);
res = s->status.contrast;
break;
case 5:
if (value>=-4) s->set_brightness(s,value);
res = s->status.brightness;
break;
case 6:
if (value>=-4) s->set_saturation(s,value);
res = s->status.saturation;
break;
}
return res;
}
uint32_t wc_get_width(void) {
camera_fb_t *wc_fb = esp_camera_fb_get();
if (!wc_fb) return 0;
wc_width=wc_fb->width;
esp_camera_fb_return(wc_fb);
return wc_width;
}
uint32_t wc_get_height(void) {
camera_fb_t *wc_fb = esp_camera_fb_get();
if (!wc_fb) return 0;
wc_height=wc_fb->height;
esp_camera_fb_return(wc_fb);
return wc_height;
}
#ifndef MAX_PICSTORE
#define MAX_PICSTORE 4
#endif
struct PICSTORE {
uint8_t *buff;
uint32_t len;
};
struct PICSTORE picstore[MAX_PICSTORE];
#ifdef COPYFRAME
struct PICSTORE tmp_picstore;
#endif
uint32_t get_picstore(int32_t num, uint8_t **buff) {
if (num<0) return MAX_PICSTORE;
*buff=picstore[num].buff;
return picstore[num].len;
}
uint32_t wc_get_jpeg(uint8_t **buff) {
size_t _jpg_buf_len = 0;
uint8_t * _jpg_buf = NULL;
camera_fb_t *wc_fb;
wc_fb = esp_camera_fb_get();
if (!wc_fb) return 0;
if (wc_fb->format!=PIXFORMAT_JPEG) {
bool jpeg_converted = frame2jpg(wc_fb, 80, &_jpg_buf, &_jpg_buf_len);
if (!jpeg_converted){
_jpg_buf_len = wc_fb->len;
_jpg_buf = wc_fb->buf;
}
} else {
_jpg_buf_len = wc_fb->len;
_jpg_buf = wc_fb->buf;
}
esp_camera_fb_return(wc_fb);
*buff=_jpg_buf;
return _jpg_buf_len;
}
uint32_t wc_get_frame(int32_t bnum) {
size_t _jpg_buf_len = 0;
uint8_t * _jpg_buf = NULL;
camera_fb_t *wc_fb=0;
bool jpeg_converted=false;
if (bnum<0) {
if (bnum<-MAX_PICSTORE) bnum=-1;
bnum=-bnum;
bnum--;
if (picstore[bnum].buff) free(picstore[bnum].buff);
picstore[bnum].len=0;
return 0;
}
#ifdef COPYFRAME
if (bnum&0x10) {
bnum&=0xf;
_jpg_buf=tmp_picstore.buff;
_jpg_buf_len=tmp_picstore.len;
if (!_jpg_buf_len) return 0;
goto pcopy;
}
#endif
wc_fb = esp_camera_fb_get();
if (!wc_fb) {
AddLog_P(WC_LOGLEVEL, "cant get frame");
return 0;
}
if (!bnum) {
wc_width = wc_fb->width;
wc_height = wc_fb->height;
esp_camera_fb_return(wc_fb);
return 0;
}
if (wc_fb->format!=PIXFORMAT_JPEG) {
jpeg_converted = frame2jpg(wc_fb, 80, &_jpg_buf, &_jpg_buf_len);
if (!jpeg_converted){
//Serial.println("JPEG compression failed");
_jpg_buf_len = wc_fb->len;
_jpg_buf = wc_fb->buf;
}
} else {
_jpg_buf_len = wc_fb->len;
_jpg_buf = wc_fb->buf;
}
pcopy:
if (bnum<1 || bnum>MAX_PICSTORE) bnum=1;
bnum--;
if (picstore[bnum].buff) free(picstore[bnum].buff);
picstore[bnum].buff = (uint8_t *)heap_caps_malloc(_jpg_buf_len+4,MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
if (picstore[bnum].buff) {
memcpy(picstore[bnum].buff,_jpg_buf,_jpg_buf_len);
picstore[bnum].len=_jpg_buf_len;
} else {
AddLog_P(WC_LOGLEVEL, "cant allocate picstore");
picstore[bnum].len=0;
}
if (wc_fb) esp_camera_fb_return(wc_fb);
if (jpeg_converted) free(_jpg_buf);
if (!picstore[bnum].buff) return 0;
return _jpg_buf_len;
}
bool HttpCheckPriviledgedAccess(bool);
extern ESP8266WebServer *Webserver;
void HandleImage(void) {
if (!HttpCheckPriviledgedAccess(true)) { return; }
uint32_t bnum = Webserver->arg(F("p")).toInt();
if (bnum<0 || bnum>MAX_PICSTORE) bnum=1;
WiFiClient client = Webserver->client();
String response = "HTTP/1.1 200 OK\r\n";
response += "Content-disposition: inline; filename=cap.jpg\r\n";
response += "Content-type: image/jpeg\r\n\r\n";
Webserver->sendContent(response);
if (!bnum) {
uint8_t *buff;
uint32_t len;
len=wc_get_jpeg(&buff);
if (len) {
client.write(buff,len);
free(buff);
}
} else {
bnum--;
if (!picstore[bnum].len) {
AddLog_P2(WC_LOGLEVEL, PSTR("no image #: %d"), bnum);
return;
}
client.write((char *)picstore[bnum].buff, picstore[bnum].len);
}
AddLog_P2(WC_LOGLEVEL, PSTR("sending image #: %d"), bnum+1);
}
ESP8266WebServer *CamServer;
#define BOUNDARY "e8b8c539-047d-4777-a985-fbba6edff11e"
WiFiClient client;
void handleMjpeg(void) {
AddLog_P(WC_LOGLEVEL, "handle camserver");
//if (!wc_stream_active) {
wc_stream_active=1;
client = CamServer->client();
AddLog_P(WC_LOGLEVEL, "create client");
//}
}
void handleMjpeg_task(void) {
camera_fb_t *wc_fb;
size_t _jpg_buf_len = 0;
uint8_t * _jpg_buf = NULL;
//WiFiClient client = CamServer->client();
uint32_t tlen;
bool jpeg_converted=false;
if (!client.connected()) {
wc_stream_active=0;
AddLog_P(WC_LOGLEVEL,"client fail");
goto exit;
}
if (wc_stream_active==1) {
client.flush();
client.setTimeout(3);
AddLog_P(WC_LOGLEVEL, "start stream");
client.print("HTTP/1.1 200 OK\r\n"
"Content-Type: multipart/x-mixed-replace;boundary=" BOUNDARY "\r\n"
"\r\n");
wc_stream_active=2;
} else {
wc_fb = esp_camera_fb_get();
if (!wc_fb) {
wc_stream_active=0;
AddLog_P(WC_LOGLEVEL, "frame fail");
goto exit;
}
if (wc_fb->format!=PIXFORMAT_JPEG) {
jpeg_converted = frame2jpg(wc_fb, 80, &_jpg_buf, &_jpg_buf_len);
if (!jpeg_converted){
AddLog_P(WC_LOGLEVEL, "JPEG compression failed");
_jpg_buf_len = wc_fb->len;
_jpg_buf = wc_fb->buf;
}
} else {
_jpg_buf_len = wc_fb->len;
_jpg_buf = wc_fb->buf;
}
client.printf("Content-Type: image/jpeg\r\n"
"Content-Length: %d\r\n"
"\r\n", static_cast<int>(_jpg_buf_len));
tlen=client.write(_jpg_buf, _jpg_buf_len);
/*
if (tlen!=_jpg_buf_len) {
esp_camera_fb_return(wc_fb);
wc_stream_active=0;
AddLog_P(WC_LOGLEVEL, "send fail");
}*/
client.print("\r\n--" BOUNDARY "\r\n");
#ifdef COPYFRAME
if (tmp_picstore.buff) free(tmp_picstore.buff);
tmp_picstore.buff = (uint8_t *)heap_caps_malloc(_jpg_buf_len+4,MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
if (tmp_picstore.buff) {
memcpy(tmp_picstore.buff,_jpg_buf,_jpg_buf_len);
tmp_picstore.len=_jpg_buf_len;
} else {
tmp_picstore.len=0;
}
#endif
if (jpeg_converted) free(_jpg_buf);
esp_camera_fb_return(wc_fb);
//AddLog_P(WC_LOGLEVEL, "send frame");
exit:
if (!wc_stream_active) {
AddLog_P(WC_LOGLEVEL, "stream exit");
client.flush();
client.stop();
}
}
}
void CamHandleRoot(void) {
//CamServer->redirect("http://" + String(ip) + ":81/cam.mjpeg");
CamServer->sendHeader("Location", WiFi.localIP().toString() + ":81/cam.mjpeg");
CamServer->send(302, "", "");
Serial.printf("WC root called");
}
uint16_t motion_detect;
uint32_t motion_ltime;
uint32_t motion_trigger;
uint32_t motion_brightness;
uint8_t *last_motion_buffer;
uint32_t wc_set_motion_detect(int32_t value) {
if (value>=0) motion_detect=value;
if (value==-1) {
return motion_trigger;
} else {
return motion_brightness;
}
}
// optional motion detector
void detect_motion(void) {
camera_fb_t *wc_fb;
uint8_t *out_buf=0;
if ((millis()-motion_ltime)>motion_detect) {
motion_ltime=millis();
wc_fb = esp_camera_fb_get();
if (!wc_fb) return;
if (!last_motion_buffer) {
last_motion_buffer=(uint8_t *)heap_caps_malloc((wc_fb->width*wc_fb->height)+4,MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
}
if (last_motion_buffer) {
if (wc_fb->format==PIXFORMAT_JPEG) {
out_buf=(uint8_t *)heap_caps_malloc((wc_fb->width*wc_fb->height*3)+4,MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
if (out_buf) {
fmt2rgb888(wc_fb->buf, wc_fb->len, wc_fb->format, out_buf);
uint32_t x,y;
uint8_t *pxi=out_buf;
uint8_t *pxr=last_motion_buffer;
// convert to bw
uint64_t accu=0;
uint64_t bright=0;
for (y=0;y<wc_fb->height;y++) {
for (x=0;x<wc_fb->width;x++) {
int32_t gray=(pxi[0]+pxi[1]+pxi[2])/3;
int32_t lgray=pxr[0];
pxr[0]=gray;
pxi+=3;
pxr++;
accu+=abs(gray-lgray);
bright+=gray;
}
}
motion_trigger=accu/((wc_fb->height*wc_fb->width)/100);
motion_brightness=bright/((wc_fb->height*wc_fb->width)/100);
free(out_buf);
}
}
}
esp_camera_fb_return(wc_fb);
}
}
uint32_t wc_set_streamserver(uint32_t flag) {
if (global_state.wifi_down) return 0;
wc_stream_active=0;
if (flag) {
if (!CamServer) {
CamServer = new ESP8266WebServer(81);
CamServer->on("/", CamHandleRoot);
CamServer->on("/cam.mjpeg", handleMjpeg);
CamServer->on("/cam.jpg", handleMjpeg);
CamServer->on("/stream", handleMjpeg);
AddLog_P(WC_LOGLEVEL, "cam stream init");
CamServer->begin();
}
} else {
if (CamServer) {
CamServer->stop();
delete CamServer;
CamServer=NULL;
AddLog_P(WC_LOGLEVEL, "cam stream exit");
}
}
return 0;
}
void wc_loop(void) {
if (CamServer) CamServer->handleClient();
if (wc_stream_active) handleMjpeg_task();
if (motion_detect) detect_motion();
}
void wc_pic_setup(void) {
Webserver->on("/wc.jpg", HandleImage);
Webserver->on("/wc.mjpeg", HandleImage);
}
/*
typedef enum {
// FRAMESIZE_96x96, // 96x96
FRAMESIZE_QQVGA, // 160x120 0
FRAMESIZE_QQVGA2, // 128x160 1
FRAMESIZE_QCIF, // 176x144 2
FRAMESIZE_HQVGA, // 240x176 3
// FRAMESIZE_240x240, // 240x240 3
FRAMESIZE_QVGA, // 320x240 4
FRAMESIZE_CIF, // 400x296 5
FRAMESIZE_VGA, // 640x480 6
FRAMESIZE_SVGA, // 800x600 7
FRAMESIZE_XGA, // 1024x768 8
FRAMESIZE_SXGA, // 1280x1024 9
FRAMESIZE_UXGA, // 1600x1200 10
FRAMESIZE_QXGA, // 2048*1536
FRAMESIZE_INVALID
} framesize_t;
flash led = gpio4
red led = gpio 33
*/
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
bool Xdrv39(uint8_t function) {
bool result = false;
switch (function) {
case FUNC_LOOP:
wc_loop();
break;
case FUNC_WEB_ADD_HANDLER:
wc_pic_setup();
break;
}
return result;
}
#endif