|
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.
|
|
|
|
|
Quote: This code fragment contains some global variables, we cannot see how they are declared, initialized and probably used somewhere else
Thanks a lot to write here. Yes this code has global variable like Global.c. But this file explains to call internal and external memory and RAM. A summary can find here, DSP Global Variable Specification Syntax[^]
Looking at the first defination,
in_data = Register[CH1_VOLTAGE] * 1000 - Vfilt_16;
Register[CH1_VOLTAGE]=float Register[COUNT_OF_REGISTER];
Vfilt_16 is also a register value.
About k the C2000 digital lib manual says,
Proportional gain is usually applied directly to servo error, however, a feature of this controller is that sensitivity of the proportional path to the reference input can be weighted differently from that of the feedback input. This is achieved through the Kr variable, and provides an additional degree of freedom when tuning the controller. The proportional control law is shown in Equation
v5 (k) = Krr(k) - y(k)
In most situations the weighting gain Kr will be unity.
Its a PID controller equation. Such functions are typically based on integrating the transient error over a fixed time interval.
The DCL.h library header file includes a set of default floating-point values that can be used for
initialization purposes. These configure the proportional path to have unity gain, zero integral gain, output
saturation limits of ±1.
#define PI_DEFAULTS { 1.0f, \
0.0f, \
0.0f, \
1.0f, \
-1.0f, \
1.0f \
}
An example of the C declaration of an initialized PI structure is:
PI pi1 = PI_DEFAULTS;
The formation of the graph can be find here,7.7. Graph Tools — Code Composer Studio 9.3.0 Documentation[^]
|
|
|
|
|
Hello There,
I am a newbie here. I just want to know few things those are really hard to track down. I am trying to debug a existing F/W code mostly written in c or c++. This IDE and compiler is from a particular DSP/MCU company. This code is a complex one and F/W and S/W mixed together. Some codes are not even understandable because I have very limited knowledge in syntax, pointer datatype and flags etc. Manuals and examples can give some ideas.
Now lets talk a specific problem, .c file includes some header dependencies like those are customized, made for particular reason.
#include "DSP28x_Project.h"
#include "Register.h"
#include "CLA.h"
#include "LED.h"
Mentioned register file is customized. I am not going to describe in detail. Before I post a portion of code I should explain a little. In this PI control we are trying to play with register values which may bring the channel voltage that relates with current in terms of different conditional case. Here we go,
Register[CURENT_LIMIT_STATUS] = CURRENT_LIMIT_STATUS_NULL;
if(bSysRun)
{
Voltage_ch1 -= Current_T_ch1 * Register[LINE_DROP_SCALE];
Voltage_ch1 = Voltage_ch1 < 0 ? 0 : Voltage_ch1;
if(Register[USE_LOADSHARE] != 0)
{
Voltage_ch1 -= Register[LOADSHARE_DIFF_CURRENT] * Register[LOAD_SHARE_SCALE_V];
Current_BP -= Register[LOADSHARE_DIFF_CURRENT] * Register[LOAD_SHARE_SCALE_B];
if(Register[RUN_MODE] == MODE_SOLAR)
{
Voltage_ch2 += Register[LOADSHARE_DIFF_CURRENT] * Register[LOAD_SHARE_SCALE_B];
}
}
What I did not understand as follows,
1. Subtract AND assignment operator, what -= means ?
2. what += means ?
3. What does !=0 means in if structure ?
4. What double equals == means ?
|
|
|
|
|