1
0
mirror of https://github.com/rene-dev/stmbl.git synced 2024-12-19 07:02:13 +00:00
stmbl/term/dqdraw.hpp

54 lines
1.1 KiB
C++
Raw Permalink Normal View History

2015-01-04 01:34:04 +00:00
#pragma once
#include <wx/wx.h>
#include <wx/splitter.h>
#include <wx/listctrl.h>
#include <wx/bitmap.h>
#include <wx/artprov.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/choice.h>
#include <wx/arrstr.h>
#include <wx/button.h>
#include <math.h>
#include <vector>
#include <libserialport.h>
2015-01-04 05:57:06 +00:00
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
2015-01-04 01:34:04 +00:00
class dqDraw : public wxPanel
{
public:
dqDraw(wxFrame* parent);
void paintEvent(wxPaintEvent & evt);
void render(wxDC& dc);
void mouseEvent(wxMouseEvent & evt);
2015-01-04 05:57:06 +00:00
void scrollEvent(wxMouseEvent & evt);
2015-01-04 01:34:04 +00:00
wxPoint mousepos;
bool drag;
wxCoord w,h;
2015-01-04 03:10:59 +00:00
wxStaticText *text;
2015-01-04 01:34:04 +00:00
//motor model
double Omega;
double Id, Iq, Iabs;
double Ud, Uq, Uabs;
double M_perm;
double M_rel;
double M_ges;
void SetCurrent(double d, double q);
void Update();
void SetVoltage(double d, double q);
double P,Psi,Ld,Lq,Rs;
double In,Un;
2015-01-04 04:13:57 +00:00
double Pm,Pe;
2015-01-04 01:34:04 +00:00
double scale;
2015-01-11 01:12:52 +00:00
double iscale;
2015-01-04 01:34:04 +00:00
private:
};