https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html
Good links for FreeRTOS
AWS FreeRTOS, Digital Electronics Posted on 04 Mar, 2021 07:53:50- Comments(0) https://www.guivi.one/?p=142
- Share
Check Available Serial Pots
C/C++ Programming Posted on 30 Jan, 2021 23:02:24void CDialog::SelectComPort()
{
TCHAR lpTargetPath[5000]; // buffer to store the path of the COMPORTS
DWORD test;
bool gotPort = 0; // in case the port is not found
m_serialList.ResetContent();
for (int i = 0; i < 255; i++) // checking ports from COM0 to COM255
{
CString str;
str.Format(_T("%d"), i);
CString ComName = CString("COM") + CString(str); // converting to COM0, COM1, COM2
test = QueryDosDevice(ComName, lpTargetPath, 5000);
// Test the return value and error if any
if (test != 0) //QueryDosDevice returns zero if it didn't find an object
{
m_serialList.AddString((CString)ComName); // add to the ComboBox
gotPort = 1; // found port
}
if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
lpTargetPath[10000]; // in case the buffer got filled, increase size of the buffer.
continue;
}
}
if (!gotPort) // if not port
m_serialList.AddString((CString)"No Active Ports Found"); // to display error message incase no ports found
}
- Comments(0) https://www.guivi.one/?p=133
- Share
On Device Arrived/Removed
C/C++ Programming Posted on 30 Jan, 2021 23:01:31BEGIN_MESSAGE_MAP(CDialog, CDialogEx)
ON_WM_DEVICECHANGE()
END_MESSAGE_MAP()
BOOL CDialog::OnDeviceChange( UINT wParam, DWORD_PTR lParam)
{
}
- Comments(0) https://www.guivi.one/?p=131
- Share
cv::Mat paint in MFC
OpenCV & C++ Posted on 30 Jan, 2021 22:59:36void CWnd::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CWnd::OnPaint() for painting messages
if (!m_cvImage.empty()) {
CRect rect;
GetClientRect(&rect);
BITMAPINFO bmi = { 0 };
bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader);
bmi.bmiHeader.biCompression = BI_RGB;
bmi.bmiHeader.biWidth = m_cvImage.cols;
// note that bitmaps default to bottom-up, use negative height to
// represent top-down
//
bmi.bmiHeader.biHeight = m_cvImage.rows * -1;
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 24; // 32 if you use RGBQUADs for the bits
SetStretchBltMode(dc, STRETCH_HALFTONE);
StretchDIBits(dc,
0, 0,
rect.Width(), rect.Height(),
0, 0,
bmi.bmiHeader.biWidth, abs(bmi.bmiHeader.biHeight),
m_cvImage.data,
&bmi,
DIB_RGB_COLORS,
SRCCOPY);
}
}
- Comments(0) https://www.guivi.one/?p=129
- Share
Child Education
Education Posted on 14 Jan, 2021 19:21:43- Comments(0) https://www.guivi.one/?p=126
- Share
Adding folder to Dll in Visual studio Win32 apps
C/C++ Programming, Visual Studio Posted on 08 Jan, 2021 22:19:01- Go to project properties (Alt+F7)
- Under Debugging, look to the right
- There’s an Environment field.
- Add your relative path there (relative to vcproj folder) i.e. ..\some-framework\lib by appending
PATH=%PATH%;$(ProjectDir)\some-framework\lib
or prepending to the pathPATH=C:\some-framework\lib;%PATH%
- Hit F5 (debug) again and it should work.
- Comments(0) https://www.guivi.one/?p=124
- Share
Check last upgrade date of Debian base distros
Linux Posted on 05 Jan, 2021 22:25:02#!/bin/bash
#####################################################################
# BRIEF DESCRIPTION
# This script looks for the keyword 'upgrade' in the log files
# then it compares the date of all occurrences of the key word and
# and prints to shell the most recent date.
#####################################################################
# Check numer of availabe log dpkg files
mapfile -t files < <(ls /var/log/dpkg.log*)
# Debug print
# echo ${#files[@]}
# Iterate over all log files found
for ((i=0; i <${#files[@]}; i++))
do
# Debug print
# echo ${files[i]}
# grep a log file for upgrades store in an array.
mapfile -t lines < <(grep upgrade ${files[i]})
# Debug print
# echo ${#lines[@]}
# Store the number of lines on the last grep file
leng=${#lines[@]}
# loop through each line in thearray
for ((j=0; j<leng;j++)) do
# If length of $STRING is larger than one compare the new $DATE with the $STRING
# If the date is more resent store the new date in $STRING
if [ -n $STRING ]
then
DATE=${lines[j]:0:10}
# echo $DATE
if [[ "$STRING" < "$DATE" ]];
then
STRING="$DATE"
fi
else
# Initialize the $STRING
DATE=${lines[j]:0:10}
STRING="$DATE"
fi
done
done
# Output the most recent upgrade date of the system if any was found.
if [[ -n $STRING ]]
then
echo "$STRING"
fi
- Comments(0) https://www.guivi.one/?p=116
- Share
GUI Libraries For C++
C/C++ Programming Posted on 30 Dec, 2020 09:55:02Qt
Sciter
wxWidgets
GTK+
gtkmm
CEGUI
Dear ImGui
Noesis GUI
Juce
Fox Toolkit
MiniGUI
Nuklear
NanoGUI
LittlevGL
neoGFX
morda
U++
dlib
nana
GWork
libui
Agar
FLTK
IUP
Boost.UI
LCUI
GLUI
TGUI
ivtools
GuiLite
Ultralight
Chromium Embedded Framework
CopperSpice
FlatUI
SFGUI
Lgi
Verdigris
- Comments(0) https://www.guivi.one/?p=81
- Share