mirror of
https://github.com/k3ng/k3ng_rotator_controller.git
synced 2025-02-06 19:09:18 +00:00
did hack to prevent debug library errors when Ethernet functionality is compiled in
This commit is contained in:
parent
b97e45b544
commit
5ddcfbe374
@ -488,7 +488,7 @@
|
|||||||
|
|
||||||
#include "rotator_dependencies.h"
|
#include "rotator_dependencies.h"
|
||||||
|
|
||||||
#include "rotator_debug.h"
|
//#include "rotator_debug.h"
|
||||||
|
|
||||||
#ifdef FEATURE_4_BIT_LCD_DISPLAY
|
#ifdef FEATURE_4_BIT_LCD_DISPLAY
|
||||||
#include <LiquidCrystal.h> // required for classic 4 bit interface LCD display (FEATURE_4_BIT_LCD_DISPLAY)
|
#include <LiquidCrystal.h> // required for classic 4 bit interface LCD display (FEATURE_4_BIT_LCD_DISPLAY)
|
||||||
@ -594,6 +594,8 @@
|
|||||||
|
|
||||||
#include "rotator_language.h"
|
#include "rotator_language.h"
|
||||||
|
|
||||||
|
#include "rotator_debug.h"
|
||||||
|
|
||||||
|
|
||||||
/*----------------------- variables -------------------------------------*/
|
/*----------------------- variables -------------------------------------*/
|
||||||
|
|
||||||
|
@ -4,29 +4,27 @@
|
|||||||
|
|
||||||
#include "rotator_debug.h"
|
#include "rotator_debug.h"
|
||||||
|
|
||||||
|
#define FEATURE_ETHERNET
|
||||||
|
|
||||||
void DebugClass::print(const char *str)
|
void DebugClass::print(const char *str)
|
||||||
{
|
{
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
if (debug_mode & CONTROL_PORT0){
|
||||||
if (debug_mode & CONTROL_PORT0)
|
|
||||||
{
|
|
||||||
control_port->print(str);
|
control_port->print(str);
|
||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0)
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
{
|
// ethernetclient0.print(str);
|
||||||
ethernetclient0.print(str);
|
// }
|
||||||
}
|
// #endif //FEATURE_ETHERNET
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1)
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
{
|
// ethernetclient1.print(str);
|
||||||
ethernetclient1.print(str);
|
// }
|
||||||
}
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(const __FlashStringHelper *str)
|
void DebugClass::print(const __FlashStringHelper *str)
|
||||||
@ -47,19 +45,19 @@ void DebugClass::print(const __FlashStringHelper *str)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0)
|
// if (debug_mode & ETHERNET_PORT0)
|
||||||
{
|
// {
|
||||||
ethernetclient0.write(c);
|
// ethernetclient0.write(c);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1)
|
// if (debug_mode & ETHERNET_PORT1)
|
||||||
{
|
// {
|
||||||
ethernetclient1.write(c);
|
// ethernetclient1.write(c);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,17 +69,17 @@ void DebugClass::print(char ch)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(ch);
|
// ethernetclient0.print(ch);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(ch);
|
// ethernetclient1.print(ch);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(int i)
|
void DebugClass::print(int i)
|
||||||
@ -92,17 +90,17 @@ void DebugClass::print(int i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(i);
|
// ethernetclient0.print(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(i);
|
// ethernetclient1.print(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(unsigned int i)
|
void DebugClass::print(unsigned int i)
|
||||||
@ -113,17 +111,17 @@ void DebugClass::print(unsigned int i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(i);
|
// ethernetclient0.print(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(i);
|
// ethernetclient1.print(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(long unsigned int i)
|
void DebugClass::print(long unsigned int i)
|
||||||
@ -134,17 +132,17 @@ void DebugClass::print(long unsigned int i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(i);
|
// ethernetclient0.print(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(i);
|
// ethernetclient1.print(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(long i)
|
void DebugClass::print(long i)
|
||||||
@ -155,17 +153,17 @@ void DebugClass::print(long i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(i);
|
// ethernetclient0.print(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(i);
|
// ethernetclient1.print(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(double i)
|
void DebugClass::print(double i)
|
||||||
@ -176,17 +174,17 @@ void DebugClass::print(double i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(i);
|
// ethernetclient0.print(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(i);
|
// ethernetclient1.print(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::println(double i)
|
void DebugClass::println(double i)
|
||||||
@ -197,17 +195,17 @@ void DebugClass::println(double i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.println(i);
|
// ethernetclient0.println(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.println(i);
|
// ethernetclient1.println(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(float f,byte places)
|
void DebugClass::print(float f,byte places)
|
||||||
@ -222,17 +220,17 @@ void DebugClass::print(float f,byte places)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(tempstring);
|
// ethernetclient0.print(tempstring);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(tempstring);
|
// ethernetclient1.print(tempstring);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::print(float f)
|
void DebugClass::print(float f)
|
||||||
@ -247,17 +245,17 @@ void DebugClass::print(float f)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.print(tempstring);
|
// ethernetclient0.print(tempstring);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.print(tempstring);
|
// ethernetclient1.print(tempstring);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugClass::println(const char *str)
|
void DebugClass::println(const char *str)
|
||||||
@ -268,17 +266,17 @@ void DebugClass::println(const char *str)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.println(str);
|
// ethernetclient0.println(str);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.println(str);
|
// ethernetclient1.println(str);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,17 +288,17 @@ void DebugClass::write(const char *str)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.write(str);
|
// ethernetclient0.write(str);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.write(str);
|
// ethernetclient1.write(str);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,188 +310,16 @@ void DebugClass::write(int i)
|
|||||||
}
|
}
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
// #ifdef FEATURE_ETHERNET
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
// if (debug_mode & ETHERNET_PORT0){
|
||||||
ethernetclient0.write(i);
|
// ethernetclient0.write(i);
|
||||||
}
|
// }
|
||||||
#endif //FEATURE_ETHERNET
|
// #endif //FEATURE_ETHERNET
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
// if (debug_mode & ETHERNET_PORT1){
|
||||||
ethernetclient1.write(i);
|
// ethernetclient1.write(i);
|
||||||
}
|
// }
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
// #endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//DebugClass Debug;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
2015-09-05
|
|
||||||
old code from ino:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void debug_print(char * print_string){
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->print(print_string);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.print(print_string);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.print(print_string);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
|
|
||||||
}
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
void debug_println(char * print_string){
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->println(print_string);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.println(print_string);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.println(print_string);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
|
|
||||||
}
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
void debug_print_char(char print_char){
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->print(print_char);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.print(print_char);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.print(print_char);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
}
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
void debug_write(char * print_string){
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->write(print_string);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.write(print_string);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.write(print_string);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
|
|
||||||
}
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
void debug_print_int(int print_int){
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->print(print_int);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.print(print_int);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.print(print_int);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
void debug_write_int(int write_int){
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->write(write_int);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.write(write_int);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.write(write_int);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
|
|
||||||
}
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
void debug_print_float(float print_float,byte places){
|
|
||||||
|
|
||||||
char tempstring[16] = "";
|
|
||||||
|
|
||||||
dtostrf(print_float,0,places,tempstring);
|
|
||||||
|
|
||||||
#if defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION) || defined(UNDER_DEVELOPMENT_REMOTE_UNIT_COMMANDS)
|
|
||||||
if (debug_mode & CONTROL_PORT0){
|
|
||||||
control_port->print(tempstring);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_REMOTE_UNIT_SLAVE) || defined(FEATURE_YAESU_EMULATION) || defined(FEATURE_EASYCOM_EMULATION)
|
|
||||||
|
|
||||||
#ifdef FEATURE_ETHERNET
|
|
||||||
if (debug_mode & ETHERNET_PORT0){
|
|
||||||
ethernetclient0.print(tempstring);
|
|
||||||
}
|
|
||||||
#endif //FEATURE_ETHERNET
|
|
||||||
|
|
||||||
#if defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
if (debug_mode & ETHERNET_PORT1){
|
|
||||||
ethernetclient1.print(tempstring);
|
|
||||||
}
|
|
||||||
#endif //defined(FEATURE_ETHERNET) && defined(ETHERNET_TCP_PORT_1)
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
@ -27,6 +27,11 @@
|
|||||||
#include "rotator_features.h"
|
#include "rotator_features.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// #ifdef FEATURE_ETHERNET
|
||||||
|
// #include <SPI.h>
|
||||||
|
// #include <Ethernet.h>
|
||||||
|
// #endif
|
||||||
|
|
||||||
class DebugClass
|
class DebugClass
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@ -54,10 +59,13 @@ class DebugClass
|
|||||||
void write(int i);
|
void write(int i);
|
||||||
};
|
};
|
||||||
|
|
||||||
//extern DebugClass Debug;
|
|
||||||
|
|
||||||
extern uint8_t debug_mode;
|
extern uint8_t debug_mode;
|
||||||
extern HardwareSerial * control_port;
|
extern HardwareSerial * control_port;
|
||||||
|
|
||||||
|
// #ifdef FEATURE_ETHERNET
|
||||||
|
// extern EthernetClient ethernetclient0;
|
||||||
|
// #endif
|
||||||
|
|
||||||
#endif //_ROTATOR_DEBUG_h
|
#endif //_ROTATOR_DEBUG_h
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#define FEATURE_GPS
|
#define FEATURE_GPS
|
||||||
#define FEATURE_RTC_DS1307
|
#define FEATURE_RTC_DS1307
|
||||||
// #define FEATURE_RTC_PCF8583
|
// #define FEATURE_RTC_PCF8583
|
||||||
//#define FEATURE_ETHERNET
|
#define FEATURE_ETHERNET
|
||||||
#define FEATURE_STEPPER_MOTOR // requires Mega or an AVR with Timer 5 support
|
// #define FEATURE_STEPPER_MOTOR // requires Mega or an AVR with Timer 5 support
|
||||||
// #define FEATURE_AUTOCORRECT
|
// #define FEATURE_AUTOCORRECT
|
||||||
|
|
||||||
#define LANGUAGE_ENGLISH // all languages customized in rotator_language.h
|
#define LANGUAGE_ENGLISH // all languages customized in rotator_language.h
|
||||||
@ -38,7 +38,7 @@
|
|||||||
// #define FEATURE_REMOTE_UNIT_SLAVE // uncomment this to make this unit a remote unit controlled by a host unit
|
// #define FEATURE_REMOTE_UNIT_SLAVE // uncomment this to make this unit a remote unit controlled by a host unit
|
||||||
|
|
||||||
// #define FEATURE_MASTER_WITH_SERIAL_SLAVE // [master]{remote_port}<-------serial-------->{control_port}[slave]
|
// #define FEATURE_MASTER_WITH_SERIAL_SLAVE // [master]{remote_port}<-------serial-------->{control_port}[slave]
|
||||||
//#define FEATURE_MASTER_WITH_ETHERNET_SLAVE // [master]<-------------------ethernet--------------------->[slave]
|
#define FEATURE_MASTER_WITH_ETHERNET_SLAVE // [master]<-------------------ethernet--------------------->[slave]
|
||||||
|
|
||||||
|
|
||||||
/* position sensors - pick one for azimuth and one for elevation if using an az/el rotator */
|
/* position sensors - pick one for azimuth and one for elevation if using an az/el rotator */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user