Byla vydána únorová aktualizace aneb nová verze 1.110 editoru zdrojových kódů Visual Studio Code (Wikipedie). Přehled novinek i s náhledy a videi v poznámkách k vydání. Ve verzi 1.110 vyjde také VSCodium, tj. komunitní sestavení Visual Studia Code bez telemetrie a licenčních podmínek Microsoftu.
Apple představil 13palcový MacBook Neo s čipem A18 Pro. V základní konfiguraci za 16 990 Kč.
Kalifornský zákon AB 1043 platný od 1. ledna 2027 vyžaduje, aby operační systémy požadovaly po uživatelích věk nebo datum narození a skrze API poskytovaly aplikacím informaci, zda je uživatel mladší 13 let, má 13 až 16 let, má 16 až 18 let nebo má alespoň 18 let. Vývojáři linuxových distribucí řeší, co s tím (Ubuntu, Fedora, …).
Konference LinuxDays 2026 proběhne o víkendu 3. a 4. října v Praze v areálu ČVUT v Dejvicích na FIT. Čekají vás desítky přednášek, workshopy, stánky a setkání se spoustou chytrých lidí.
Nové verze webových prohlížečů Chrome a Firefox jsou vydávány každé 4 týdny. Aktuální verze Chrome je 145. Aktuální verze Firefoxu je 148. Od září přejde Chrome na dvoutýdenní cyklus vydávání. V kterém týdnu bude mít Chrome větší číslo verze než Firefox? 😀
Apple představil nové čipy M5 Pro a M5 Max, MacBook Pro s čipy M5 Pro a M5 Max, MacBook Air s čipem M5 a Studio Display a nový Studio Display XDR.
Bylo spuštěno hlasování o přednáškách a workshopech pro letošní Installfest, jenž proběhne o víkendu 28. a 29. března v Praze na Karlově náměstí 13.
Byla vydána (Mastodon, 𝕏) třetí RC verze GIMPu 3.2. Přehled novinek v oznámení o vydání. Podrobně v souboru NEWS na GitLabu.
Apple představil iPhone 17e a iPad Air s čipem M4.
Byla vydána verze 1.0 editoru kódů Gram. Jedná se o fork editoru Zed bez telemetrie a umělé inteligence.
#include < stdio.h >
#include < stdlib.h >
#define JOISTICK "/dev/js0"
unsigned char buffer[33];
void cti_joi(void)
{
FILE *joi;
if ((joi=fopen(JOISTICK,"rb"))==NULL)
{
fprintf(stderr,"Nelze otevrit soubor "JOISTICK" \n\n");
_exit(1);
}
fread(buffer,32,1,joi);
fclose(joi);
return;
}
int main(void)
{
printf("\n\n Program pro testovani joystiku-tlacitek v1.0 (c) 2000 Soban Petr S&S\n\n");
cti_joi();
printf("Tlacitka %X %X %X %X ", buffer[4],buffer[12],buffer[20],buffer[28]);
return 0;
}
Je možné že pokud používáte pouze vstupy tlačítek tak musíte na vstupy kde jsou potenciometry připojit odpory tak jako by tam ty potenciometry byly.
Dále u jednoho game portu jsem nemohl přečíst vstupy ať jsem dělal co chtěl (z mého zařízení) kdešto normální tlačítka tam fungovala, asi ten výstup toho tranzistoru nestačil, musel by se asi upravit vystupní obvod toho zařízení.
Cele to obsahuje jednu soucastku a to NTC termistor 100k. Ten je zapojen mezi zem a potenciometrovej vstup. Tam pak vyuzivam vnitrni kapacitu kde v programu cekam na nabiti do 2/3 nabijeciho napeti. Pak se vnitrni komparator preklopi a ja to vyhodnotim a vypocitam odpor. Kapacitu znam. Je to pro moji potrebu dostatecne presne. Jinak je zajimave ze to pod W98 chodi v pohode a pod Linuxem ne. Takze spatnym zapojenim to nebude i kdyz jsem to zkousel predelat. Ja mam problem v tom ze kdyz dam vypis cat (nebo jak se to pise) toho /dev/js0 tak mi napise ze je to neplatne zarizeni atd a plno dalsich kecu. Zkratka potrebuji jen vedet jak zpravne nastavit game port. Ne joystick. Zkratka nejak nahrat spravny modul pro game port a udelat spravne simlinky. Podle navodu to proste nerozchodim. Diky moc.
Jinak možná že by to chtělo ještě odpor mezi termistor a +5V.
Jinak cist joistick můžete i takhle vypíše jednotlivé potenciometry. (Tímto programem jsem se inspiroval při čtení joisticku)
/*
* jstest.c Version 1.2
*
* Copyright (c) 1996-1999 Vojtech Pavlik
*
* Sponsored by SuSE
*/
/*
* This program can be used to test all the features of the Linux
* joystick API, including non-blocking and select() access, as
* well as version 0.x compatibility mode. It is also intended to
* serve as an example implementation for those who wish to learn
* how to write their own joystick using applications.
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to < vojtech@suse.cz >, or by paper mail:
* Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
*/
#include < sys/ioctl.h >
#include < sys/time.h >
#include < sys/types.h >
#include < stdlib.h >
#include < fcntl.h >
#include < unistd.h >
#include < stdio.h >
#include < errno.h >
#include < string.h >
#include < linux/joystick.h >
#define NAME_LENGTH 128
int main (int argc, char **argv)
{
int fd;
unsigned char axes = 2;
unsigned char buttons = 2;
int version = 0x000800;
char name[NAME_LENGTH] = "Unknown";
if (argc < 2 || argc > 3 || !strcmp("--help", argv[1])) {
puts("");
puts("Usage: jstest [< mode >] < device >");
puts("");
puts("Modes:");
puts(" --normal One-line mode showing immediate status");
puts(" --old Same as --normal, using 0.x interface");
puts(" --event Prints events as they come in");
puts(" --nonblock Same as --event, in nonblocking mode");
puts(" --select Same as --event, using select() call");
puts("");
exit(1);
}
if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
perror("jstest");
exit(1);
}
ioctl(fd, JSIOCGVERSION, &version);
ioctl(fd, JSIOCGAXES, &axes);
ioctl(fd, JSIOCGBUTTONS, &buttons);
ioctl(fd, JSIOCGNAME(NAME_LENGTH), name);
printf("Joystick (%s) has %d axes and %d buttons. Driver version is %d.%d.%d.\n",
name, axes, buttons, version >> 16, (version >> 8) & 0xff, version & 0xff);
printf("Testing ... (interrupt to exit)\n");
/*
* Old (0.x) interface.
*/
if ((argc == 2 && version < 0x010000) || !strcmp("--old", argv[1])) {
struct JS_DATA_TYPE js;
while (1) {
if (read(fd, &js, JS_RETURN) != JS_RETURN) {
perror("\njstest: error reading");
exit(1);
}
printf("Axes: X:%3d Y:%3d Buttons: A:%s B:%s\r",
js.x, js.y, (js.buttons & 1) ? "on " : "off", (js.buttons & 2) ? "on " : "off");
fflush(stdout);
usleep(10000);
}
}
/*
* Event interface, single line readout.
*/
if (argc == 2 || !strcmp("--normal", argv[1])) {
int *axis;
int *button;
int i;
struct js_event js;
axis = calloc(axes, sizeof(int));
button = calloc(buttons, sizeof(char));
while (1) {
if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {
perror("\njstest: error reading");
exit (1);
}
switch(js.type & ~JS_EVENT_INIT) {
case JS_EVENT_BUTTON:
button[js.number] = js.value;
break;
case JS_EVENT_AXIS:
axis[js.number] = js.value;
break;
}
printf("\r");
if (axes) {
printf("Axes: ");
for (i = 0; i < axes; i++)
printf("%2d:%6d ", i, axis[i]);
}
if (buttons) {
printf("Buttons: ");
for (i = 0; i < buttons; i++)
printf("%2d:%s ", i, button[i] ? "on " : "off");
}
fflush(stdout);
}
}
/*
* Event interface, events being printed.
*/
if (!strcmp("--event", argv[1])) {
struct js_event js;
while (1) {
if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {
perror("\njstest: error reading");
exit (1);
}
printf("Event: type %d, time %d, number %d, value %d\n",
js.type, js.time, js.number, js.value);
}
}
/*
* Reading in nonblocking mode.
*/
if (!strcmp("--nonblock", argv[1])) {
struct js_event js;
fcntl(fd, F_SETFL, O_NONBLOCK);
while (1) {
while (read(fd, &js, sizeof(struct js_event)) == sizeof(struct js_event)) {
printf("Event: type %d, time %d, number %d, value %d\n",
js.type, js.time, js.number, js.value);
}
if (errno != EAGAIN) {
perror("\njstest: error reading");
exit (1);
}
usleep(10000);
}
}
/*
* Using select() on joystick fd.
*/
if (!strcmp("--select", argv[1])) {
struct js_event js;
struct timeval tv;
fd_set set;
tv.tv_sec = 1;
tv.tv_usec = 0;
while (1) {
FD_ZERO(&set);
FD_SET(fd, &set);
if (select(fd+1, &set, NULL, NULL, &tv)) {
if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) {
perror("\njstest: error reading");
exit (1);
}
printf("Event: type %d, time %d, number %d, value %d\n",
js.type, js.time, js.number, js.value);
}
}
}
printf("jstest: unknown mode: %s\n", argv[1]);
return -1;
}
integrovaná zvukovka na MB .
The following PCI drivers support the joystick natively.
Driver Module Option Available Values
---------------------------------------------------------------------------
als4000 joystick_port 0 = disable (default), 1 = auto-detect,
manual: any address (e.g. 0x200)
au88x0 N/A N/A
azf3328 joystick 0 = disable, 1 = enable, -1 = auto (default)
ens1370 joystick 0 = disable (default), 1 = enable
ens1371 joystick_port 0 = disable (default), 1 = auto-detect,
manual: 0x200, 0x208, 0x210, 0x218
cmipci joystick_port 0 = disable (default), 1 = auto-detect,
manual: any address (e.g. 0x200)
cs4281 N/A N/A
cs46xx N/A N/A
es1938 N/A N/A
es1968 joystick 0 = disable (default), 1 = enable
intel8x0(*1)joystick 0 = disable (default), 1 = enable
sonicvibes N/A N/A
trident N/A N/A
via82xx(*2) joystick 0 = disable (default), 1 = enable
ymfpci joystick_port 0 = disable (default), 1 = auto-detect,
manual: 0x201, 0x202, 0x204, 0x205(*3)
---------------------------------------------------------------------------
*1) not all chips support joystick
*2) VIA686A/B only
*3) With YMF744/754 chips, the port address can be chosen arbitrarily
Tiskni
Sdílej: