|
|
Wim Van den Borre wrote: i'm a complete beginner and was looking for people who have experience in this. You are making a huge assumption that anyone here, beside yourself, has any experience with talking to a "garmin watch via bluetooth."
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
|
That almost looks like tools one could use to read data from a Garmin device. I wonder if it would help the OP!
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I wanted to navigate to a page in PDF file.
Theoretically, this could be done with ShellExecute (NULL, "open", "Path \ File", param1, NULL, SW_NORMAL), where
param1 = "# page = 123" or "/ A page = 123" or "/ A \" page = 123 \ ""; then the PDF file is opened, but the page is not activated.
You could do the same thing by opening PDF and then navigating to the page. It's a good idea, but it has the disadvantage that I don't know either.
Does anyone know?
Thanks for the answers
|
|
|
|
|
It will depend on which application actually opens the PDF file.
|
|
|
|
|
|
You don't "control the PDF". You have to control the application that is opening and displaying the PDF file.
How you do that depends entirely on the application you're using to display the PDF. There's probably going to be applications where you don't have that control.
You can do it if the machine has Acrobat Reader installed it, which is what the previous answer is using.
|
|
|
|
|
Hello.
I'm trying to get text data from another program.
The window handle was found.
Please check the image link.
CLICK Here - Attach Image Link
But I'm not sure what to do next.
Should I use something similar to the GetDlgCtrlID method?
I do not know.
The return is -1.
Please advise.
thank you.
|
|
|
|
|
|
cocaya wrote: the GetDlgCtrlID method That will only return a valid id if the handle is that of an actual dialog control. But even if it does, the id will not be of any use.
To get the text of a Window in another process, you must send the WM_GETTEXT message (Winuser.h) - Win32 apps | Microsoft Docs[^] to it. But you first need to know that the Window contains valid text.
|
|
|
|
|
*CLICK here : Attach Image Link
handle => 0x001229e8
GetControlText(IntPtr hWnd){
// Get the size of the string required to hold the window title (including trailing null.)
Int32 titleSize = SendMessage((int)hWnd, WM_GETTEXTLENGTH, 0, 0).ToInt32();
// If titleSize is 0, there is no title so return an empty string (or null)
if (titleSize == 0)
return String.Empty;
StringBuilder title = new StringBuilder(titleSize + 1);
SendMessage(hWnd, (int)WM_GETTEXT, title.Capacity, title);
return title.ToString();
}
Thanks reply, but
When this function is executed, String.Empty is returned.
How can I get grid table values??
I desperately want to solve it.
please help me..
|
|
|
|
|
|
Thanks for the advice.
I tried the following, but the return value is 0.
int nTextLength = SendMessage(hwnd6, WM_GETTEXTLENGTH, 0, 0).ToInt32();
How should I approach it?ㅜ.ㅜ
CLICK Here : MS inspect.exe capture.
|
|
|
|
|
1. Why are you calling ToInt32 on a value that is already an int type?
2. If WM_GETTEXTLENGTH returns zero, then that tells you the Window is not a Text type. As I said yesterday, if the contents are shown in a grid then you need to find out what actual control it is, and use the control's methods to extract the contents.
|
|
|
|
|
Hi there,
I found difficulties to understand the following function,
void MakeGetStatusCMD(void)
Under this function, float type WORDS and size are defined .
This function is using for UART/MODEBUS communication protocol. Its using to know the status of receiving data in main dsp control board. Variables are defined for size of DSP Registers and counter of register.
At last, its written
<pre lang="C++">SendDSPCMD()
modified 30-Aug-21 21:41pm.
|
|
|
|
|
I guess you'll need to deliver more details about this
MakeGetStatusCMD() function (his body, anything), because we don't know anything about this
|
|
|
|
|
I guess you'll need to deliver more details about this
MakeGetStatusCMD()
function (his body, anything), because we don't know anything about this
Its a command type function. Lets say DSP is master and another type of MCU is slave.
We are trying to make bridge among them. Additionally, this Modebus protocol has interface with API and display.It may have remote control piping. Slave is host here.
This file where I got this function has included register and device functioning header file.
Those can be describe here,
BOOL SysUsartBusy;
WORD SysCmdTimeoutCount;
WORD SysCmdAckDelayCount;
WORD SysCmdDelayCount;
BYTE CmdQueueHeader, CmdQueueTail;
BYTE CmdQueue[CMD_QUEUE_SIZE];
|
|
|
|
|
Do you have the source code for the MakeGetStatusCMD() function?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Dear Sir Jeron,
Really I did not figure out what you want to explain.
Do you mean its Query command ? For API purpose those command work to identify device?
Does it work like windo command ? Quote: CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input
Kindly talk about facts that the messages are issued using Message Queue interface call. Command queue header files need to explain.
|
|
|
|
|
Quote: Under this function, float type WORDS and size are defined . Do you mean "inside' this function? If so, do you know what is inside this function?
Is this a library function for a certain MCU? If so, is there any documentation of this function?
Your initial question is quite unclear, at least to me.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Thank you. Did you see my second reply? I think this information is enough to understand what would be the function. This project is tied on QT5 with STM32 and TI DSP F2806x. widget.h Example File | Qt OpenGL[^]
This project contains IAR,ECILPSE IDE.
A display is added in ST slave, it has APP files. TCP server is involved here. Server is updating the information about DSP register. Its sending modebus Queue initiating this funtion,
Quote: void CModebusTCP::OnReceived(BYTE *pData, int nSize)
Under the function the variables are,
Quote: void MakeGetStatusCMD(void)
{
WORD *pWord;
float *pFloat;
WORD Size;
pWord = (WORD*)Uart1.TxData;
pWord[0] = DSP_CMD_GETTATUS;
pWord[1] = g_AdjustOutput;
pWord[2] = g_RunMode;
pWord[3] = g_Run;
|
|
|
|
|
I am trying to debug a complex firmware CCS V.5 program with compiler V.6.0.2. My control code has access with a PC program. All registers of my application is customized. My goal is to display particular channel voltage, but logically mathematical code should be understand. Here we go
void DispFiltering1(void)
{
float k;
float in_data;
in_data = Register[CH1_VOLTAGE] * 1000 - Vfilt_16;
dVfilt_16 = in_data + (dVfilt_16 * 0.5f);
idvfilt_16 += dVfilt_16;
k = (int)(idvfilt_16 * timeconst_inverse_16);
idvfilt_16 -= k * timeconst_16;
if(k < -slewrate_16) Vfilt_16 -= slewrate_16;
else if(k > slewrate_16) Vfilt_16 += slewrate_16;
else Vfilt_16 += k;
Register[DISP_CH1_VOLTAGE] = Vfilt_16 * 0.001;
in_data = Register[CH1_CURRENT] * 1000 - Vfilt_17;
dVfilt_17= in_data + (dVfilt_17 * 0.5f);
idvfilt_17 += dVfilt_17;
k = (int)(idvfilt_17 * timeconst_inverse_17);
idvfilt_17 -= k * timeconst_17;
if(k < -slewrate_17) Vfilt_17 -= slewrate_17;
else if(k > slewrate_17) Vfilt_17 += slewrate_17;
else Vfilt_17 += k;
Register[DISP_CH1_CURRENT] = Vfilt_17 * 0.001;
}
I will be happy if you can explain why filtering, slewrate and time constant is necessary here? Discuss kindly.
|
|
|
|
|
Your question is about mathematics, the device that you are monitoring, and the data it produces. You should check the documentation that comes with the device.
|
|
|
|
|
This code fragment contains some global variables, we cannot see how they are declared, initialized and probably used somewhere else. We don't see also the constants, maybe there are some comments in their definitions.
Anyway, looks like some (smoothing?) filter.
The best way to understand such code is to add logging with all variables printed, and to understand what happens reading this log. Another way is to make manual calculations with some predefined set of input data, with all code branches applied.
|
|
|
|