Skip to content

Commit

Permalink
Minor code prettification and copyright header fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nohal committed Jan 27, 2013
1 parent b688cdf commit 702e630
Show file tree
Hide file tree
Showing 14 changed files with 235 additions and 236 deletions.
12 changes: 6 additions & 6 deletions include/chart1.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Project: OpenCP
* Purpose: OpenCP Main wxWidgets Program
* Project: OpenCPN
* Purpose: OpenCPN Main wxWidgets Program
* Author: David Register
*
***************************************************************************
Expand Down Expand Up @@ -346,7 +346,7 @@ class MyFrame: public wxFrame
void ScrubGroupArray();
wxString GetGroupName(int igroup);
void LoadHarmonics();

bool EvalPriority( wxString message, wxString stream_name, int stream_priority );

int m_StatusBarFieldCount;
Expand Down Expand Up @@ -417,10 +417,10 @@ class MyPrintout: public wxPrintout
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);

void DrawPageOne(wxDC *dc);







};


Expand Down
2 changes: 1 addition & 1 deletion include/concanv.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
*
* Project: OpenCP
* Project: OpenCPN
* Purpose: Console Canvas
* Author: David Register
*
Expand Down
2 changes: 1 addition & 1 deletion include/cutil.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
*
* Project: OpenCP
* Project: OpenCPN
* Purpose: Extern C Linked Utilities
* Author: David Register
*
Expand Down
100 changes: 50 additions & 50 deletions include/datastream.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/******************************************************************************
*
* Project: OpenCP
* Project: OpenCPN
* Purpose: NMEA Data Object
* Author: David Register
*
Expand Down Expand Up @@ -185,11 +185,11 @@ class OCPN_DataStreamEvent: public wxEvent
void SetNMEAString(std::string string) { m_NMEAstring = string; }
void SetStreamName(std::string string) { m_StreamName = string; }
void SetPriority( int prio ) { m_priority = prio; }

std::string GetNMEAString() { return m_NMEAstring; }
std::string GetStreamName() { return m_StreamName; }
int GetStreamPriority() { return m_priority; }

// required for sending with wxPostEvent()
wxEvent *Clone() const;

Expand Down Expand Up @@ -249,7 +249,7 @@ class DataStream: public wxEvtHandler
void SetSecThreadActive(void){m_bsec_thread_active = true;}
void SetSecThreadInActive(void){m_bsec_thread_active = false;}
bool IsSecThreadActive(){ return m_bsec_thread_active; }

void SetChecksumCheck(bool check) { m_bchecksumCheck = check; }

void SetInputFilter(wxArrayString filter) { m_input_filter = filter; }
Expand All @@ -259,8 +259,8 @@ class DataStream: public wxEvtHandler
bool SentencePassesFilter(const wxString& sentence, FilterDirection direction);
bool ChecksumOK(const wxString& sentence);
bool GetGarminMode(){ return m_bGarmin_GRMN_mode; }


wxString GetBaudRate(){ return m_BaudRate; }
dsPortType GetPortType(){ return m_io_select; }
wxArrayString GetInputSentenceList(){ return m_input_filter; }
Expand All @@ -269,7 +269,7 @@ class DataStream: public wxEvtHandler
ListType GetOutputSentenceListType(){ return m_output_filter_type; }
bool GetChecksumCheck(){ return m_bchecksumCheck; }
ConnectionType GetConnectionType(){ return m_connection_type; }

int m_Thread_run_flag;
private:
void Init(void);
Expand Down Expand Up @@ -307,13 +307,13 @@ class DataStream: public wxEvtHandler
ListType m_input_filter_type;
wxArrayString m_output_filter;
ListType m_output_filter_type;

bool m_bGarmin_GRMN_mode;
GarminProtocolHandler *m_GarminHandler;
wxDateTime m_connect_time;
bool m_brx_connect_event;
wxTimer m_socket_timer;


DECLARE_EVENT_TABLE()
};
Expand Down Expand Up @@ -383,9 +383,9 @@ class OCP_DataStreamInput_Thread: public wxThread
DataStream *m_launcher;
wxString m_PortName;
wxString m_FullPortName;

dsPortType m_io_select;

char *put_ptr;
char *tak_ptr;

Expand All @@ -397,11 +397,11 @@ class OCP_DataStreamInput_Thread: public wxThread
int m_gps_fd;
int m_baud;
int m_n_timeout;

int m_takIndex;
int m_putIndex;
wxArrayString m_outQueue;


#ifdef __WXMSW__
HANDLE m_hSerialComm;
Expand Down Expand Up @@ -597,31 +597,31 @@ class GarminProtocolHandler: public wxEvtHandler
public:
GarminProtocolHandler(DataStream *parent, wxEvtHandler *MessageTarget, bool bsel_usb);
~GarminProtocolHandler();

void Close(void);


void StopIOThread(bool b_pause);
void RestartIOThread(void);

void StopSerialThread(void);

void OnTimerGarmin1(wxTimerEvent& event);

bool FindGarminDeviceInterface();



wxEvtHandler *m_pMainEventHandler;
DataStream *m_pparent;

int m_max_tx_size;
int m_receive_state;
cpo_sat_data m_sat_data[12];
unit_info_type grmin_unit_info[2];
int m_nSats;
wxTimer TimerGarmin1;

int m_Thread_run_flag;
GARMIN_Serial_Thread *m_garmin_serial_thread;
GARMIN_USB_Thread *m_garmin_usb_thread;
Expand All @@ -630,25 +630,25 @@ class GarminProtocolHandler: public wxEvtHandler
bool m_bOK;
bool m_busb;
wxString m_port;
#ifdef __WXMSW__

#ifdef __WXMSW__
HANDLE garmin_usb_start();
bool ResetGarminUSBDriver();
bool IsGarminPlugged();
bool gusb_syncup(void);

int gusb_win_get(garmin_usb_packet *ibuf, size_t sz);
int gusb_win_get_bulk(garmin_usb_packet *ibuf, size_t sz);
int gusb_win_send(const garmin_usb_packet *opkt, size_t sz);

int gusb_cmd_send(const garmin_usb_packet *opkt, size_t sz);
int gusb_cmd_get(garmin_usb_packet *ibuf, size_t sz);

HANDLE m_usb_handle;

WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
#endif
#endif

DECLARE_EVENT_TABLE()
};

Expand All @@ -662,28 +662,28 @@ class GarminProtocolHandler: public wxEvtHandler
//-------------------------------------------------------------------------------------------------------------
class GARMIN_Serial_Thread: public wxThread
{

public:

GARMIN_Serial_Thread(GarminProtocolHandler *parent,
DataStream *GParentStream,
wxEvtHandler *MessageTarget,
wxString port);
~GARMIN_Serial_Thread(void);
void *Entry();
void string(wxCharBuffer mb_str);


private:
wxEvtHandler *m_pMessageTarget;
GarminProtocolHandler *m_parent;
DataStream *m_parent_stream;


wxString m_port;
bool m_bconnected;
bool m_bdetected;

};


Expand All @@ -697,38 +697,38 @@ class GARMIN_Serial_Thread: public wxThread
//-------------------------------------------------------------------------------------------------------------
class GARMIN_USB_Thread: public wxThread
{

public:

GARMIN_USB_Thread(GarminProtocolHandler *parent,
DataStream *GParentStream,
wxEvtHandler *MessageTarget,
unsigned int device_handle,
size_t max_tx_size);
~GARMIN_USB_Thread(void);
void *Entry();


private:
DataStream *m_parent_stream;

int gusb_win_get(garmin_usb_packet *ibuf, size_t sz);
int gusb_win_get_bulk(garmin_usb_packet *ibuf, size_t sz);
int gusb_cmd_get(garmin_usb_packet *ibuf, size_t sz);

wxEvtHandler *m_pMessageTarget;
GarminProtocolHandler *m_parent;


int m_receive_state;
cpo_sat_data m_sat_data[12];
unit_info_type grmin_unit_info[2];
int m_nSats;
int m_max_tx_size;
#ifdef __WXMSW__
#ifdef __WXMSW__
HANDLE m_usb_handle;
#endif
#endif

};


Expand Down
Loading

0 comments on commit 702e630

Please sign in to comment.