- Milyen TV-t vegyek?
- Vezetékes FEJhallgatók
- Bemutatta első Snapdragon X-re épülő notebookját az ASUS
- NVIDIA GeForce RTX 4080 /4080S / 4090 (AD103 / 102)
- AMD vs. INTEL vs. NVIDIA
- Milyen notebookot vegyek?
- Multimédiás / PC-s hangfalszettek (2.0, 2.1, 5.1)
- AMD Ryzen 9 / 7 / 5 7***(X) "Zen 4" (AM5)
- Melyik tápegységet vegyem?
- OLED TV topic
Hirdetés
-
Spyra: nagynyomású, akkus, automata vízipuska
lo Type-C port, egy töltéssel 2200 lövés, több, mint 2 kg-os súly, automata víz felszívás... Start the epic! :)
-
One UI 6.1 frissítésekkel túlórázik a Samsung
ma Középkategóriás telefon és ütésálló tablet is részesült belőle a hétvége előtt.
-
Színészek hangjait lopta el egy AI-cég
it Az USA-ban bepereltek egy AI-céget, mert a vád szerint ellopták a színészek hangjait, majd AI segítségével a saját céljaikra használták azokat.
-
PROHARDVER!
Amit érdemes tudni a Raspberry Pi-kről:
A legelső változat 2012-ben jelent meg. Pici, olcsó és nagyon alacsony fogyasztású, hobby-célú kártyagép. Felépítése ARM alapú, nem PC-architektúra, hanem kb. egy régi mobilhoz hasonló. Nagyon sok mindenre használható! A Linux-nak és a magas eladási mennyiségnek köszönhetően jelentős fejlesztőtáborral rendelkezik.
Új hozzászólás Aktív témák
-
Szita1
tag
Sziasztok, kérdésem lenne,fizzilogic 433Mhz , Aurdinora van írva egy RemoteTransmitter.cpp és ..h Szeretném valahogy RPire átfordítani de a g++ hibákat ad ki Mi lehet a gondja?
[ Szerkesztve ]
-
Szita1
tag
/*
* RemoteSwitch library v2.3.0 (20121229) made by Randy Simons http://randysimons.nl/
* See RemoteReceiver.h for details.
*
* License: GPLv3. See license.txt
*/
#include "RemoteReceiver.h"
/************
* RemoteReceiver
************/
int8_t RemoteReceiver::_interrupt;
volatile int8_t RemoteReceiver::_state;
byte RemoteReceiver::_minRepeats;
RemoteReceiverCallBack RemoteReceiver::_callback;
boolean RemoteReceiver::_inCallback = false;
boolean RemoteReceiver::_enabled = false;
void RemoteReceiver::init(int8_t interrupt, byte minRepeats, RemoteReceiverCallBack callback) {
_interrupt = interrupt;
_minRepeats = minRepeats;
_callback = callback;
enable();
if (_interrupt >= 0) {
attachInterrupt(_interrupt, interruptHandler, CHANGE);
}
}
void RemoteReceiver::enable() {
_state = -1;
_enabled = true;
}
void RemoteReceiver::disable() {
_enabled = false;
}
void RemoteReceiver::deinit() {
_enabled = false;
if (_interrupt >= 0) {
detachInterrupt(_interrupt);
}
}
void RemoteReceiver::interruptHandler() {
if (!_enabled) {
return;
}
static unsigned int period; // Calculated duration of 1 period
static byte receivedBit; // Contains "bit" currently receiving
static unsigned long receivedCode; // Contains received code
static unsigned long previousCode; // Contains previous received code
static byte repeats = 0; // The number of times the an identical code is received in a row.
static unsigned long edgeTimeStamp[3] = {0, }; // Timestamp of edges
static unsigned int min1Period, max1Period, min3Period, max3Period;
static bool skip;
// Filter out too short pulses. This method works as a low pass filter.
edgeTimeStamp[1] = edgeTimeStamp[2];
edgeTimeStamp[2] = micros();
if (skip) {
skip = false;
return;
}
if (_state >= 0 && edgeTimeStamp[2]-edgeTimeStamp[1] < min1Period) {
// Last edge was too short.
// Skip this edge, and the next too.
skip = true;
return;
}
unsigned int duration = edgeTimeStamp[1] - edgeTimeStamp[0];
edgeTimeStamp[0] = edgeTimeStamp[1];
// Note that if state>=0, duration is always >= 1 period.
if (_state==-1) { // Waiting for sync-signal
if (duration>3720) { // =31*120 minimal time between two edges before decoding starts.
// Sync signal received.. Preparing for decoding
period=duration/31;
receivedCode=previousCode=repeats=0;
// Allow for large error-margin. ElCheapo-hardware :(
min1Period=period*4/10; // Avoid floating point math; saves memory.
max1Period=period*16/10;
min3Period=period*23/10;
max3Period=period*37/10;
}
else {
return;
}
} else if (_state<48) { // Decoding message
receivedBit <<= 1;
// bit part durations can ONLY be 1 or 3 periods.
if (duration<=max1Period) {
receivedBit &= B1110; // Clear LSB of receivedBit
}
else if (duration>=min3Period && duration<=max3Period) {
receivedBit |= B1; // Set LSB of receivedBit
}
else { // Otherwise the entire sequence is invalid
_state=-1;
return;
}
if ((_state%4)==3) { // Last bit part?
// Shift
receivedCode*=3;
// Only 4 LSB's are used; trim the rest.
switch (receivedBit & B1111) {
case B0101: // short long short long == B0101
// bit "0" received
receivedCode+=0; // I hope the optimizer handles this ;)
break;
case B1010: // long short long short == B1010
// bit "1" received
receivedCode+=1;
break;
case B0110: // short long long short
// bit "f" received
receivedCode+=2;
break;
default:
// Bit was rubbish. Abort.
_state=-1;
return;
}
}
} else if (_state==48) { // Waiting for sync bit part 1
// Must be 1 period.
if (duration>max1Period) {
_state=-1;
return;
}
} else { // Waiting for sync bit part 2
// Must be 31 periods.
if (duration<period*25 || duration>period*36) {
_state=-1;
return;
}
// receivedCode is a valid code!
if (receivedCode!=previousCode) {
repeats=0;
previousCode=receivedCode;
}
repeats++;
if (repeats>=_minRepeats) {
if (!_inCallback) {
_inCallback = true;
(_callback)(receivedCode, period);
_inCallback = false;
}
// Reset after callback.
_state=-1;
return;
}
// Reset for next round
receivedCode = 0;
_state=0; // no need to wait for another sync-bit!
return;
}
_state++;
return;
}
boolean RemoteReceiver::isReceiving(int waitMillis) {
unsigned long startTime=millis();
int waited; // Signed int!
do {
if (_state == 48) { // Abort if a valid code has been received in the mean time
return true;
}
waited = (millis()-startTime);
} while(waited>=0 && waited <= waitMillis); // Yes, clock wraps every 50 days. And then you'd have to wait for a looooong time.
return false;
} -
Szita1
tag
Itt a hibaüzi :
g++ -c -o RemoteTransmitter.o RemoteTransmitter.cpp
RemoteTransmitter.cpp: In static member function ‘static void RemoteTransmitter::sendTelegram(long unsigned int, byte)’:
RemoteTransmitter.cpp:54:47: error: ‘B111’ was not declared in this scope
RemoteTransmitter.cpp: In static member function ‘static void RemoteTransmitter::sendCode(byte, long unsigned int, unsigned int, byte)’:
RemoteTransmitter.cpp:72:28: error: ‘B111’ was not declared in this scope
RemoteTransmitter.cpp:80:19: error: ‘B11’ was not declared in this scope
make: *** [RemoteTransmitter.o] Error 1Mi baja lehet? :S
[ Szerkesztve ]
-
Szita1
tag
-
Szita1
tag
még hosszabb hibalista :S
pi@raspberrypi ~/433Utils $ make
g++ -c -o RemoteTransmitter.o RemoteTransmitter.cpp
RemoteTransmitter.cpp: In static member function ‘static void RemoteReceiver::init(int8_t, byte, RemoteReceiverCallBack)’:
RemoteTransmitter.cpp:29:55: error: ‘attachInterrupt’ was not declared in this scope
RemoteTransmitter.cpp: In static member function ‘static void RemoteReceiver::deinit()’:
RemoteTransmitter.cpp:45:29: error: ‘detachInterrupt’ was not declared in this scope
RemoteTransmitter.cpp: In static member function ‘static void RemoteReceiver::interruptHandler()’:
RemoteTransmitter.cpp:104:19: error: ‘B1110’ was not declared in this scope
RemoteTransmitter.cpp:107:19: error: ‘B1’ was not declared in this scope
RemoteTransmitter.cpp:119:26: error: ‘B1111’ was not declared in this scope
RemoteTransmitter.cpp:120:10: error: ‘B0101’ was not declared in this scope
RemoteTransmitter.cpp:124:10: error: ‘B1010’ was not declared in this scope
RemoteTransmitter.cpp:128:10: error: ‘B0110’ was not declared in this scope
make: *** [RemoteTransmitter.o] Error 1Nem értem Aurdinon gond nélkül ment Pedig csak a sendTelegram kéne belőle valahogy, kár hogy a RCSwitch.cpp nem tud ilyet küldeni ...
[ Szerkesztve ]
-
Szita1
tag
A küldött (sendTelegram(code) értékére lennék kiváncsi, hogy tudom ezt kiszámolni?? :S
receivedCode=530713;
period=125;//Copy the received code.
code = receivedCode & 0xFFFFF; //truncate to 20 bits for show; receivedCode is never more than 20 bits..//Add the period duration to the code. Range: [0..511] (9 bit)
code |= (unsigned long)period << 23;//Add the number of repeats to the code. Range: [0..7] (3 bit). The actual number of repeats will be 2^(repeats),
//in this case 8
code |= 3L << 20;//Retransmit the signal on pin 11. Note: no object was created!
RemoteTransmitter::sendTelegram(code,10);Ha ez sikerülne talán RCSwitchel tudnám küldeni a helyes kódot.
[ Szerkesztve ]
-
Szita1
tag
Sziasztok, egy .sh fájlt hogy tudok futtatni hogy csak 50% procit használjon??
-
Szita1
tag
Sziasztok, érdeklődnék mi a megoldás arra, hogy ne fagyon le a rendszer? néha semmit se lehet csinálni, putty is hibákat ír ki, nem reagál semmire sem.
Lehet egy olyan megoldás, ha újraindítom kihúzással akkor visszaáll egy alap állapotra?? Nem vagyok egy Linux guru, csak ötletelek a megoldáson.
Vagy egy USB pendriveról visszaállítás??
A segítséget előre is köszönöm.
-
Szita1
tag
Ezeket az infókat szedtem ki most:
arm: frequency(45)=950100000
core: frequency(1)=250000000
h264: frequency(28)=250000000
isp: frequency(42)=249999000
v3d: frequency(43)=250000000
uart: frequency(22)=3000000
pwm: frequency(25)=0
emmc: frequency(47)=100000000
pixel: frequency(29)=0
vec: frequency(10)=108000000
hdmi: frequency(9)=0
dpi: frequency(4)=0core: volt=1.35V
sdram_c: volt=1.20V
sdram_i: volt=1.20V
sdram_p: volt=1.23Vvcgencmd measure_temp
temp=49.2'C[ Szerkesztve ]
-
Szita1
tag
Sziasztok, rpi csomagtelepítésnél ez a hibaüzi fogadott, nem tudom hogy tudom javítani. Mi lehet a baj? megoldás?
üzi:
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libsemanage-common' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2) -
Szita1
tag
Rpi ből épített lakás vezérlő
Androidra ajtónyitás jelzés GCM üzenettel.
[ Szerkesztve ]
-
Szita1
tag
válasz Sk8erPeter #14176 üzenetére
Köszi a kritikát, amin tudtam javítottam.
Új hozzászólás Aktív témák
- Milyen légkondit a lakásba?
- Metal topik
- Megérkezett a Google Pixel 7 és 7 Pro
- Eredeti játékok OFF topik
- Milyen TV-t vegyek?
- Vezetékes FEJhallgatók
- Bemutatta első Snapdragon X-re épülő notebookját az ASUS
- EA Sports WRC '23
- Telekom otthoni szolgáltatások (TV, internet, telefon)
- NVIDIA GeForce RTX 4080 /4080S / 4090 (AD103 / 102)
- További aktív témák...
- AKCIÓ! AMD GAMER PC: Ryzen 7 5700X / B450 / RX 6700XT 12GB / 2TB SSD / 16GB 3200MHz / 750W Moduláris
- Ryzen 7 Konfig
- Lenovo Munkaállomás: Xeon W3-2425/RTX A4000 16Gb/64Gb DDR5 Ram/1Tb Samsung SSD
- AM számla - Mini PC / SFF / MT - Brand gépek - Fujitsu / Lenovo / HP / DELL - több db, 1 év garancia
- Hivatalos Raspberry Pi 7 colos érintőképernyő házzal
- Alap pc eladó //Q6600 // 4 GB DDR3 // HD 7790 OC // 450W táp
- HP ProDesk 600 G2 SFF - i3 6100 - 2x4gb DDR4 2133Mhz Ram - 256GB SSD (100/100%)
- Asus M5A97 LE R2.0 PC, hatmagos FX proci, 4 GB VGA, 256 GB SSD!
- MineBox 8 all in one bányászdoboz
- AKCIÓ! AMD Ryzen 5 3600 // Asus RTX 2070 Super // 48GB 3200MHz // 750W
Állásajánlatok
Cég: Ozeki Kft.
Város: Debrecen
Cég: Promenade Publishing House Kft.
Város: Budapest