[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: maxresdefault.jpg (131 KB, 1280x720)
131 KB
131 KB JPG
What are you working on, /g/?
Previous: >>108226774
>>
>>108264010
A heterogeneous embedded system
>>
>write 1 line of code to flip pin in any other system
now the fags will tell me that they are not actively trying to kill linux when this is the official example of how to flip a pin
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2023 Kent Gibson <warthog618@gmail.com>

"""Minimal example of toggling a single line."""

import gpiod
import time

from gpiod.line import Direction, Value


def toggle_value(value):
if value == Value.INACTIVE:
return Value.ACTIVE
return Value.INACTIVE


def toggle_line_value(chip_path, line_offset):
value_str = {Value.ACTIVE: "Active", Value.INACTIVE: "Inactive"}
value = Value.ACTIVE

with gpiod.request_lines(
chip_path,
consumer="toggle-line-value",
config={
line_offset: gpiod.LineSettings(
direction=Direction.OUTPUT, output_value=value
)
},
) as request:
while True:
print("{}={}".format(line_offset, value_str[value]))
time.sleep(1)
value = toggle_value(value)
request.set_value(line_offset, value)


if __name__ == "__main__":
try:
toggle_line_value("/dev/gpiochip0", 5)
except OSError as ex:
print(ex, "\nCustomise the example configuration to suit your situation")
>>
>>108264045
That's exactly the reason I'm making a HES
Toggling a pin in embedded is literally writing a bit to a register, in linux they made this ioctl mess
>>
speeding up video loading for my youtube client
>>
>>108263982
use Haskell instead
>>
>>108264010
>What are you working on, /g/?
Debugging RTT logging to my debug probe.
>>
>>108264098
>get prototype on my board
>firmware made by some 3rd party that I need to work on
>faggot electronic team didn't wire SWO pin and the firmware uses it for logging
it's such a simple thing, why do they always make it a issue.
>yeah there is also uart tx pin test point where you can solder a wire if you need it
hey thanks fags
>>
Trying to use ESP-IDF for a project, and it seems all the actually useful functions are "deprecated" or "private" so you have to #include "esp_private/..." or write registers directly. I don't know why they're so intent on making you do things "their" way, but it makes life hard if their APIs don't fit your project.
>>
>>108264316
Just use esp-rs
>>
>>108264316
I personally prefer to read the datasheet and make my own firmware, corpo tools often suck
>>
>>108264362
>I personally prefer to read the datasheet and make my own firmware
ain't no client got time / money for that shit.
with esp the datasheets are hard to find and you likely are doing wireless so you have to use their firmware blobs.
Though mostly espressif basics APIs are stable so no idea what >>108264316 is doing
>>
>>108264362
If only, but Espressif's chip documentation is pretty bad and you need their blobs for networking as >>108264397 says.
>>108264397
>Though mostly espressif basics APIs are stable so no idea what 108264316 (You) is doing
Trying to control an unsupported display through one of the I2S cores.
The display vendor's code uses Arduino so I wanted to use ESP-IDF instead, and I'm learning the functions for controlling pin muxing yourself are all deprecated or private. Also enabling and resetting peripheral controllers is limited to private functions only (periph_module_reset, periph_module_enable). What's the point of restricting that?
>>
>>108264492
>Trying to control an unsupported display
I know your pain, just try to get something to work, there usually is no "nice solution".
>>
>>108264522
Thanks, I mostly just want to vent.
I also saw a few third-party projects online that say I2S0 does not support 8-bit output, only I2S1 does, but for the life of me I can't find that in the TRM or datasheet, so who knows. Guess I'll find out.
>>
>>108264569
Which chip in particular are you using
>>
>>108264595
ESP32-WROVER-E which has an ESP32-D0WD-V3
>>
So, apparently my arduino microcontroller has something called "fuses" that change some of the operating parameters of the MCU. How do I set them, and once I do can I then change them later or are they then permanently fused?
>>
>>108264781
How you set them depends on the specific MCU, and they're almost certainly these which are permanent.
https://en.wikipedia.org/wiki/EFuse
>>
>>108264815
Oh. Ok, thanks. The wikipedia article does mention resettable efuses.
So I should try to understand the MCU documentation.
>>
GLORY TO IRAN AND C
>>
>>108265000
Real ones use Zig in memory of Al-Zutt
>>
File: 1768854276865547.jpg (93 KB, 1200x1167)
93 KB
93 KB JPG
>>108264010
How do I learn C/C++? I want to become smart like this guy https://www.youtube.com/@dr-Jonas-Birch/videos
>>
>>108265741
Pick up a book and start doing exercises until you feel ready to tackle a project.
>>
>>108265741
BUY AN ADD JONAS
>>
>>108265741
start with bjarne's latest book Programming Principles and Practice in C++ the C++23 edition
it has a reputation of being a bit dry., although it's apparently a bit more streamlined than previous editions, but he made the language and he actually knows how to use it

whatever you do don't do what I did early on which was use a mix of old resources and "university recommended" learning materials before /dpt/ steered me towards some better intermediate level resources
books from before 2011 are from before C++ took the first steps to actually being a worthwhile language and before it fixed the first wave of serious issues with the language and standard library
god help you if you use books from before 98 when it wasn't standardized at all

after that make some shitty GUI applications in Qt or some other framework to get a feel for organizing real projects,, maybe use that time to practice using some baby mode versions of low level features like abstractions over multiple threads before you dip your toes into the real fun stuff like low level multithreading or graphics programming
the isocpp website has some interesting featured blogs that cover topics from beginner to cutting edge

you'll pick up C from working with C++ long enough
learning C first will generally fuck up good C++ habits whereas generally learning C++ will give you over time let you learn to respect and understand C programming habits from having to work with C libraries a lot
the ones that are still popular even in C++ are usually very intentional and well designed so you're getting exposed more to the cream of the crop (as long as you avoid the windows API) and what influence C will have on your habits at that point will be good as opposed to really lazy shitty beginner C++ written by a C programmer
>>
File: linkedlist-nodes.png (897 KB, 599x823)
897 KB
897 KB PNG
thanks for the anon posting random leet codes. good picks. fun stuff.
>>
File: 1519381991012.png (210 KB, 500x372)
210 KB
210 KB PNG
>>108265741
I see sloppa thumnails, I click "do not recommend channel", simple as.
>>
>>108266000
Cute wallpaper
>>
File: linkedlist.png (2.28 MB, 1536x1024)
2.28 MB
2.28 MB PNG
>>108266273
>a visual representation of a a linked list but with anime girls
>>
File: 2026-03-01 02-48-59_2.mp4 (3.59 MB, 1920x1056)
3.59 MB
3.59 MB MP4
>>108264098
It's working. Now I have separate channels for communication. Basic logging gets a buffer where it skips logs if probe can't catch up(also uses defmt "compression"), and perf data is just plain text with blocking on full so I can transmit larger chunks of statistics without any loss. It also no longer clutters stdout while doing so.
>>
How do I make the company dependent on me so that their choices are either to keep me happy or to spend hundreds of thousands hiring consultants to resume from where I left off?
>>
>>108266306
>all contiguous so no reason to assume linked
>>
>>108266775
Write your stuff in C, but optimized for the local platform (no fopen, no fclose, no malloc, but raw kernel interfaces).
>>
>>108266986
>Cut your own limbs while cutting the company limbs
>>
>>108266775
implement your own array lang thats subtly different from every other array lang in esoteric ways, and then slowly start porting random pieces of code to it via DLLs
>>
>>108267201
>avoiding userspace crap invented for compatibility with the smallest common denominator is "cutting your own limps"
Autist.
>>
>>108267328
Using C is the cutting your own limbs part
>>
>>108264010
>What are you working on, /g/?
https://github.com/orlfman/FFmpeg-Converter-GTK

Got avt-av1, x265, x264, and now vp9 codec tabs working.
>>
>>108267348
Why?
>>
>>108267367
C is bad boomer, sorry to break it for you. We in modern society enjoy higher level languages.
>>
>>108267352
I'm stealing this for my own, thanks
>>
>>108267373
>C IS LE BAD
>BECAUSE
>BECAUSE
>BECAUSE IT JUST IS OK
I can really feel the IQ points zoomers are lacking in your post.
>>
I'm pretty close to building an app, but I don't want to open up anything until I know it can't be easily hacked. How should I go about finding a third party security expert to manually audit the app?
>>
File: 1618954816048.png (528 KB, 606x1080)
528 KB
528 KB PNG
>>108267378
It's amazing how black you sound.
>>
>>108267380
Tell one reason to use it instead of Rust or Go. I'm waiting.
>>
>>108267408
bohoo welcome to the real world kiddo
>>
>>108267435
Decades of code generation optimizations.
>>
>>108267443
>anon steals free stuff in the real world too
Not beating the allegations.
>>
File: 1770509795002317.png (591 KB, 720x541)
591 KB
591 KB PNG
>>108267476
>t.
>>
>>108267378
by all means. i made the license the unlicense. go for it.
>>
>>108267495
I accept your concession.
>>
>>108267486
if its free how can you steal it? check and mate
>>
>>108267507
If it makes you feel better I'm not even the original guy. You lost btw ;)
>>
>>108267508
Like this: >>108267408
>>
>>108267511
i didn't damage you repo stop defamating me
>>
>>108267510
Holy cope.
>>
>>108267516
>>108267507
>>
>>108267514
>>108267378
>>
>>108267522
>>108267516
>>
>regdumper wannabe at it again
>>
Wannabe?
>>
You're obviously not the real one since you're just posting the same old screenshots from a year ago.
>>
File: Screenshot.png (166 KB, 2141x1350)
166 KB
166 KB PNG
>>108267352
quality profiles for quick settings. like, imageboard for this pakistani basket weaving forum
>>
>>108267580
I like that headcanon.
>>
>>108267633
what does console do
>>
>>108267659
Debug. For you can see what actually happened, why something error, etc. You can click the search icon near the trash icon (trash clears the console window) to search the output and such. it also shows the full ffmpeg command that was sent.
You can't actually run anything from it, its all read only output.
>>
>>108267678
And a little tour guide, The information tab shows basic information about both the input file, and the successful converted output file. To compare them.
>>
>>108267688
One thing I am really happy about getting done and working is the "Color Correction" settings. Can really mess around and alter RGB and such. Very easily.
>>
>>108267702
and the trim tab. can scrub, trim out segments, encode them or do a pure copy. the re-encode is connected to the selected codec tabs. so whatever you set in those tabs, the re-encode will use. and obviously general settings too. so you can re-encode, scale the video and all that stuff at the same time. and you can automatically conat all the segments or split them all into individual files.
>>
>>108267729
oh and to try to help get good, clean cuts, and i should make it clear in the tooltips, is it cuts to the nearest keyframe.
>>
>>108267729
nice that looks clean. feature request: a crop tab.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.