DPC Module:DPC under Windows

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
(How to use the DEMO application)
(How to use the DEMO application)
Line 32: Line 32:
10. Record mouse position for go to 10 when LightOff. If click the button , 13 will show , you can click anywhere which you want for light on.
10. Record mouse position for go to 10 when LightOff. If click the button , 13 will show , you can click anywhere which you want for light on.
-
11. Record mouse position for go to 10 when LightOff. If click the button , The Record Hot Key window will show.
+
11. Record hotkey for go to 10 when LightOff. If click the button , The Record Hot Key window will show.
 +
 
 +
12. When click minimized , DPC will hide and show in the notification area.
[[Image:DPC_AP_3.jpg]]<br />
[[Image:DPC_AP_3.jpg]]<br />
 +
 +
13. The light on mouse position and hotkay can not use together , after you record hotkey , you can't use the position anymore.
 +
[[Image:DPC_AP_4.jpg]]<br />
[[Image:DPC_AP_4.jpg]]<br />
-
[[Image:DPC_AP_5.jpg]]<br />
 
 +
14. First key of hotkey
 +
 +
15. Second key of hotkey
 +
 +
16. Third key hotkey
 +
 +
17. Confirm the hotkey which you entered
 +
 +
18. Show hotkey which you set.
 +
 +
19. Hotkey will show here.
 +
 +
[[Image:DPC_AP_5.jpg]]<br />
-
#Close COM Port
+
20. If you want to exit DPC , you should click right button of mouse on the icon and choose exit.
-
#UP line message
+
-
#LOW line message
+
-
#UP line message send to LCM device
+
-
#LOW line message send to LCM device
+
-
#Check LCM all pixel work
+
== Sample code Introduction ==
== Sample code Introduction ==

Revision as of 15:07, 6 April 2009

Contents

DPC Module Spec

The Sample code source you can download form

Source file: DPCv2.4wSrc.rar

Binary file: DPC_v2.4w.rar

How to use the DEMO application

Image:DPC_AP_1.jpg

1. When double click "DPC v2.4w.exe",it will hide and show in the notification area.

Image:DPC_AP_2.jpg

2. Panel selection

3. Confirm the panel which selected

4. If you choose to save panel , you need not to select panel again next time.

5. If you install DPC v2.4w , it will autorun when start Windows XP.

6. If you don't want to use DPC anymore , you can uninstall it.

7. Brightness control , you can choose : 10,20,30,40,50,60,70,80,90,100.

8. Show the brightness data which you choose.

9. When click the LightOff button , the panel will become darkest.

10. Record mouse position for go to 10 when LightOff. If click the button , 13 will show , you can click anywhere which you want for light on.

11. Record hotkey for go to 10 when LightOff. If click the button , The Record Hot Key window will show.

12. When click minimized , DPC will hide and show in the notification area.


Image:DPC_AP_3.jpg

13. The light on mouse position and hotkay can not use together , after you record hotkey , you can't use the position anymore.

Image:DPC_AP_4.jpg

14. First key of hotkey

15. Second key of hotkey

16. Third key hotkey

17. Confirm the hotkey which you entered

18. Show hotkey which you set.

19. Hotkey will show here.

Image:DPC_AP_5.jpg

20. If you want to exit DPC , you should click right button of mouse on the icon and choose exit.

Sample code Introduction

Open COM Port Device

In Sample code /LCD_CTLDlg.cpp lin 157

  if(m_SerialPort.InitPort(this,nPort,9600,'N',8,1,EV_RXFLAG|EV_RXCHAR,512)) //Set LCM to 9600.n.8.1
  {
  m_SerialPort.StartMonitoring(); //Open Com port monitoring
  m_bSerialPortOpened=TRUE; //Set COM port open 
  }

Close COM Port Device

In Sample code /LCD_CTLDlg.cpp lin 171

  m_SerialPort.ClosePort(); //Set COM port close
  m_bSerialPortOpened=FALSE;

Send the UP line message to LCM Device

In Sample code /LCD_CTLDlg.cpp lin 183

  if(!m_bSerialPortOpened) return; //check the com port was open
  UpdateData(TRUE);
  char szSend[30] = {0x1b, 0x51, 0x41}; //0x1b , 0x51 ,0x41 for LCM send UPline command
  sprintf(szSend+3, "%s\r", m_Sendmsg);
  m_SerialPort.WriteToPort(szSend); //Write command and message to LCM device

Send the LOW line message to LCM Device

In Sample code /LCD_CTLDlg.cpp lin 215

  UpdateData();
  char szSend[30] = {0x1b, 0x51, 0x42}; //0x1b , 0x51 ,0x42 for LCM send LOWline command
  sprintf(szSend+3, "%s\r", m_Sendmsg2);
  m_SerialPort.WriteToPort(szSend); //Write command and message to LCM device

LCM Command list

Please check the page6 in spec file ,you can download form LCM-Spec

Personal tools