Byla vydána nová verze 12.0 media serveru Jellyfin (Wikipedie). Přehled novinek v poznámkách k vydání. Pro vyzkoušení je k dispozici Demo Server. Jellyfin je fork media serveru Emby, původně Media Browser.
V MikroTik RouterOS bylo nalezeno šest zranitelností společně pojmenovaných MikroTrick umožňujících útočníkovi, pokud má přístup k SSH, získat plnou kontrolu nad zařízením bez nutnosti autentizace. Ve verzích RouterOS 7.25beta3, 7.24.2, 7.23.4 a 6.49.21 je již opraveno.
Byla vydána verze 9.5 open source unixového operačního systému NetBSD (Wikipedie). Přehled novinek v poznámkách k vydání. Jedná se poslední vydání řady NetBSD 9. Doporučen je přechod na NetBSD 11 nebo NetBSD 10.
Akční adventura State of Mind je na portále GOG.com zdarma, akce trvá do 10. září.
Na Kickstarteru běží kampaň na podporu malého robotický psa Petoi Quaddle. Postaven je na ESP32-S3. V několika variantách. S řadou senzorů. Programovat lze pomocí Pythonu, C++ nebo i vizuálních bloků. Zkoušet a trénovat lze v simulátoru.
Dětem začala škola a nedobrovolně se tak musí vzdělávat. Avšak pro dospělé, kteří se chtějí vzdělávat nebo naopak se o vědomosti podělit, je tu Virtuální Bastlírna - jako každý měsíc si můžete online a zdarma nezávazně popovídat o vědě a technice nejen s bastlíři, ale i s vývojáři, vědci nebo profesory. A čemu se strahováci budou věnovat? Blíží se KiCAD 11 s nespočtem novinek, z nichž zde musí zmínit alespoň možnost kótování a závislostí z
… více »Asahi Linux, tj. Linux pro Apple Silicon, oficiálně podporuje čipy M3 (M3, M3 Pro a M3 Max).
Společnost Acer oslavila 50 let. Na tiskové konferenci next@acer představila řadu novinek. Vypíchnout lze přenosný ePaper displej Acer EP130K, přenosné řešení se třemi displeji Acer PD163Q P3 nebo herní handheld a notebook v jednom DualPlay Mini.
Server SiFive BigSky SF-2U870 2U je založený na jádře SiFive P870-D, zatím je naintegrovaných 32 jader 256 GB RAM 2 GHz, škálovat lze do 256 jader na čip. O něco podrobnější popis serveru v článku SiFive BigSky Ships the First RISC-V Server. Is the GPU Head Node the Prize? na futurumgroup.com. Asi ani tento čip nebude na úrovni nejlepších 64-bit ARMů a AMD Zenů, ale splňuje RVA23 specifikaci a je podporovaný Ubuntu 26.04 LTS a RHEL 10. V článku je
… více »Na YouTube lze zhlédnout nový celovečerní dokumentární film The Story of VS Code | Official Documentary věnovaný Visual Studio Code.
/* compass.c
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
/* Note that the documentation for the compass states its address as 0xC0.
* However, this includes the low bit which specifies read or write.
* Linux i2c does not include this bit in this address, so the actual
* address is 0xC0 shifted down, 0x60.
*/
#define CMPS03_ADDR 0x60
/* The important registers on the compass. Internal/test registers omitted. */
#define CMPS03_SOFTWARE_REVISION 0x0
#define CMPS03_BEARING_BYTE 0x1
#define CMPS03_BEARING_WORD_HIGH 0x2
#define CMPS03_BEARING_WORD_LOW 0x3
#define CMPS03_CALIBRATE_CMD 0xF
int main(int argc, char *argv[]) {
char *end;
int res,file;
int e1;
char filename[20] ;
long funcs;
int heading_byte, heading_word_h, heading_word_l;
int bearing_long, bearing_degrees;
sprintf(filename,"/dev/i2c-0");
if ((file = open(filename,O_RDWR)) < 0) {
e1 = errno;
if (e1 != ENOENT) {
fprintf(stderr,"Error: Could not open file '%s' : %sn",
filename,strerror(e1));
if(e1 == EACCES)
fprintf(stderr,"Run as root?n");
}
}
/* Get software revision number */
res = i2c_smbus_read_byte_data(file, CMPS03_SOFTWARE_REVISION);
if (res < 0) {
printf("Cannot read software revision leveln");
} else {
printf("Software revision level: %02xn", res);
}
/* Loop and read from the compass. */
while (1) {
/* The heading byte is 0-255 for the 360 degrees. */
heading_byte = i2c_smbus_read_byte_data(file, CMPS03_BEARING_BYTE);
if (heading_byte < 0) { printf("Error reading from compass."); exit(1);}
/* The high resolution heading is given in two registers, and is 10 * the
* heading in degrees, ie 359.9 degrees reads as 3599. */
heading_word_h = i2c_smbus_read_byte_data(file, CMPS03_BEARING_WORD_HIGH);
if (heading_word_h < 0) { printf("Error reading from compass."); exit(1);}
heading_word_l = i2c_smbus_read_byte_data(file, CMPS03_BEARING_WORD_LOW);
if (heading_word_l < 0) { printf("Error reading from compass."); exit(1);}
/* Combine the two bytes, and get the heading in degrees. */
bearing_long = heading_word_h * 256 + heading_word_l;
bearing_degrees = bearing_long / 10;
printf("Bearing: %d \n", bearing_degrees);
/* Wait for a while. */
usleep(200000);
}
}
Kompilace vyhodí vždy tyto chyby:
[honza@AMD2000 ~]$ cc i2c.c i2c.c:97:2: warning: no newline at end of file /tmp/ccNQKa9S.o: In function `main': i2c.c:(.text+0xbe): undefined reference to `i2c_smbus_read_byte_data' i2c.c:(.text+0xfb): undefined reference to `i2c_smbus_read_byte_data' i2c.c:(.text+0x12f): undefined reference to `i2c_smbus_read_byte_data' i2c.c:(.text+0x163): undefined reference to `i2c_smbus_read_byte_data' collect2: ld returned 1 exit statusNevíte někdo co s tím?
(collect2: ld returned 1 exit status)
zkuste pridat parametr -li2c (nebo neco v tom smyslu - pridani i2c knihovny)
Tiskni
Sdílej: