'잡동사니'에 해당되는 글 13666건

  1. 2022.10.27 질러?
  2. 2022.10.26 회사차를 몰아보니.. 2
  3. 2022.10.26 mkpipe 와 poll
  4. 2022.10.24 닌텐도 스위치 방틴유리 깨짐
  5. 2022.10.24 FFT
  6. 2022.10.23 장보기 두렵다
  7. 2022.10.22 피곤 기절
  8. 2022.10.20 ‘F_SETPIPE_SZ’ undeclared
  9. 2022.10.19 fftw 예제 와 복소수 처리
  10. 2022.10.19 tlv

먼가 의욕도 없고 흐음..

질러야 할 때 인가!

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

10월 끝  (0) 2022.10.31
ko  (0) 2022.10.28
장보기 두렵다  (0) 2022.10.23
피곤 기절  (0) 2022.10.22
기절기절  (0) 2022.10.09
Posted by 구차니

요즘 차들이 차선유지 못하고 불도 안켜는 이유를 알 것 같다.

 

차종 : 기아 스포티지 신형?

원인 : LCD 계기판, 터치식 조작

 

예를들어 외기조절을 하려고 하면

구형 차량의 경우

위치 확인 -> 손으로 더듬으면서 버튼 위치 확인 -> 눌렸다는 감촉으로 끝! -> 눈으로 쓰윽~ 인데

신형 차량의 경우

위치 확인 -> 물리버튼이 아니기에 눈으로 보면서 위치를 짚어야 함, 터치라서 다른데 누르면 안됨 -> 터치 -> 눌렸는지 다시 확인

의 순서로 기존의 물리버튼이 1초 정도만 잠시 다른 짓을 하면 된다고 하면

터치 기반의 센터페시아(?)의 경우 2초 정도로 조금은 더 오래 걸리는 느낌?

 

그리고 계기판도 LCD로 인해 항상 불이켜져 있다 보니

아이콘의 위치를 찾아서 전조등이 켜졌는지를 봐야 알수 있으니(게다가 라이트도 흰색이라 티도 잘 안남)

 

개인적으로는 이러한 터치 스크린으로의 변화는

제조사의 물리버튼 축소를 통한 단가낮추기 + QC 편의성 + 수명주기 테스트 등등 여러가지

복합적인 원인중 비용이 가장 크지 않나 생각된다.

 

개인적으로 운전을 잘하는편이라 생각하지 않기에

차만큼은 어느정도 구식적인 물리버튼을 유지해주고

 

즉각적인 정보획득이 가능하도록

빨간 깜박이

브레이크 등, 깜박이 크기 및 위치 분리 및 통일 등은

외국과 다르더라도 유지했으면 한다.

Posted by 구차니
Linux API/linux2022. 10. 26. 14:24

가능은 한 것 같은데..

[링크 : https://stackoverflow.com/questions/15055065/o-rdwr-on-named-pipes-with-poll]

[링크 : https://man7.org/linux/man-pages/man3/mkfifo.3.html]

 

Macro: int ENXIO“No such device or address.” The system tried to use the device represented by a file you specified, and it couldn’t find the device. This can mean that the device file was installed incorrectly, or that the physical device is missing or not correctly attached to the computer.

[링크 : https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html]

 

+

2022.10.27

POLLIN으로 탐지가 되는 듯?

$ cat rx.c
//#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <linux/fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/poll.h>

#define  FIFO_FILE   "/tmp/fifo"
#define  BUFF_SIZE  1024*768*4
struct pollfd pfd[1];

int main(int argc, char** argv)
{
                int ret = 0;
                int   counter = 0;
                int   fd;
                char  buff[BUFF_SIZE];

                //              printf("argc[%d]\n",argc);
                if ( -1 == mkfifo( FIFO_FILE, 0666)){
                                perror( "mkfifo() 실행에러");
                                exit( 1);
                }

                if ( -1 == ( fd = open( FIFO_FILE, O_RDONLY|O_NONBLOCK))){  //  <---- (A)
                                perror( "open() 실행에러");
                                exit( 1);
                }
                ret = fcntl(fd, F_SETPIPE_SZ, 1024 * 1024);
                pfd[0].fd = fd;
                pfd[0].events = POLLIN;

                printf("fd[%d]ret[%d]\n",fd,ret);

                while( 1 ){
                                int n = poll(pfd, 1, 10);
                                if (n > 0)
                                {
                                        memset( buff, 0, BUFF_SIZE);
                                        ret = read( fd, buff, BUFF_SIZE);
                                        if(ret > 0 )
                                                        printf("ret[%d]\n",ret);
                                        //      printf( "%d: %s\n", counter++, buff);
                                }
                                printf(".");
                                usleep(10000);
                }
                close( fd);
}
$ cat tx.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>

#define  FIFO_FILE   "/tmp/fifo"

int main_loop = 1;
int write_loop = 1;

void sigint_handler(int sig)
{
                main_loop = 0;
                write_loop = 0;
}

void sigpipe_handler(int sig)
{
                write_loop = 0;
}

int main(int argc, char **argv)
{
                int   fd;
                int   fd_r;
                //   char *str   = "badayak.com";
                char *str = NULL;
                char *temp = NULL;

                str = (char*)malloc(1024*768*4);
                temp = (char*)malloc(1024*768*4);
                memset(str, *argv[1], 1024*768*4);

//              signal(SIGPIPE, SIG_IGN);
                signal(SIGPIPE, &sigpipe_handler);
                signal(SIGINT, &sigint_handler);
                /*
                   printf("%d\n",__LINE__);
                   if ( -1 == mkfifo( FIFO_FILE, 0666)){
                   perror( "mkfifo() 실행에러");
                   exit( 1);
                   }
                 */
                while(main_loop)
                {
                                printf("%d\n",__LINE__);
                                do {
                                                fd = open( FIFO_FILE, O_WRONLY | O_NONBLOCK);
                                                usleep(100000);
                                                printf("fd[%d] %d\n",fd,__LINE__);
                                                if(main_loop == 0 && write_loop == 0) exit(1);
                                } while(fd == -1);
                                write_loop = 1;

                                int ret = 0;
                                while(write_loop)
                                {
                                                printf("%d\n",__LINE__);
                                                int a = write( fd, str, atoi(argv[1]));
                                                printf("%d a[%d]\n",__LINE__,a);
                                                usleep(1000000);
                                }
                }
                close( fd);
}

'Linux API > linux' 카테고리의 다른 글

pthread  (0) 2022.11.23
iio(industrial io) 문서  (0) 2022.11.11
‘F_SETPIPE_SZ’ undeclared  (0) 2022.10.20
linux fifo  (0) 2022.10.18
SIGPIPE  (0) 2022.10.17
Posted by 구차니
게임/닌텐도 스위치2022. 10. 24. 23:07

으앙 ㅠㅠ

Posted by 구차니

FFT

FFT Size - 몇 번의 샘플을 분석할 것인지

Window - 사용하지 않을때 Rectangular / Flat / Uniform

- Hannning Window(cosine?)

- Blackman 윈도우, Kaiser 윈도우(최근 제안, 사이드 로브가 적은 편)

 

사이드 로브(side libe, leakage) - 중심 주파수 하나가 아니라 주변부 주파수가 나오는 문제

 

대역폭(Bandwidth) - Hz 단위

 

[링크 : https://m.blog.naver.com/suya309/221467948212]

 

[링크 : https://scribblinganything.tistory.com/181]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

real to complex  (0) 2022.11.04
fftw wisdom  (0) 2022.11.04
fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw 테스트(tests/bench)  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
Posted by 구차니

가격이 머 조금 집으면 10만원대..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

ko  (0) 2022.10.28
질러?  (0) 2022.10.27
피곤 기절  (0) 2022.10.22
기절기절  (0) 2022.10.09
일정 망함  (0) 2022.10.08
Posted by 구차니

자도자도 피곤하네

연혼이 피로한게야..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

질러?  (0) 2022.10.27
장보기 두렵다  (0) 2022.10.23
기절기절  (0) 2022.10.09
일정 망함  (0) 2022.10.08
내일 여의도 불꽃축제  (0) 2022.10.07
Posted by 구차니
Linux API/linux2022. 10. 20. 10:50

커널이 5.4.0 이라 그런가

해당 선언을 해주어야 에러가 사라진다.

 

#define _GNU_SOURCE

[링크 : https://stackoverflow.com/questions/25411892/f-setpipe-sz-undeclared]

 

 

Defining _GNU_SOURCE has nothing to do with license and everything to do with writing (non-)portable code. If you define _GNU_SOURCE, you will get:
  1. access to lots of nonstandard GNU/Linux extension functions
  2. access to traditional functions which were omitted from the POSIX standard (often for good reason, such as being replaced with better alternatives, or being tied to particular legacy implementations)
  3. access to low-level functions that cannot be portable, but that you sometimes need for implementing system utilities like mount, ifconfig, etc.
  4. broken behavior for lots of POSIX-specified functions, where the GNU folks disagreed with the standards committee on how the functions should behave and decided to do their own thing.
As long as you're aware of these things, it should not be a problem to define _GNU_SOURCE, but you should avoid defining it and instead define _POSIX_C_SOURCE=200809L or _XOPEN_SOURCE=700 when possible to ensure that your programs are portable.
In particular, the things from _GNU_SOURCE that you should never use are #2 and #4 above.
 

[링크 : https://stackoverflow.com/questions/5582211/what-does-define-gnu-source-imply]

 

호환성 지정 매크로

[링크 : https://m.blog.naver.com/netiz21/150015716721]

 

#include <fcntl.h> 대신

#include <linux/fcntl.h> 하면 _GNU_SOURCE를 해주지 않아도 되긴 한데

다른데서 경고가 뜨니 알아서 써야 할 듯.

/usr/include/linux/fcntl.h:28:#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
/usr/include/linux/fcntl.h:29:#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)

'Linux API > linux' 카테고리의 다른 글

iio(industrial io) 문서  (0) 2022.11.11
mkpipe 와 poll  (0) 2022.10.26
linux fifo  (0) 2022.10.18
SIGPIPE  (0) 2022.10.17
linux ipc 최대 데이터 길이  (0) 2022.10.11
Posted by 구차니

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw wisdom  (0) 2022.11.04
FFT  (0) 2022.10.24
fftw 테스트(tests/bench)  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
fft  (0) 2020.11.25
Posted by 구차니

tlv

 

http://www.ktword.co.kr/test/view/view.php?m_temp1=3739

'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글

vRAN  (0) 2023.08.23
cordic (coordinate rotation digital computer)  (0) 2023.02.27
DR - Disaster Recovery Plan  (0) 2022.10.17
SLP - Superword Level Parallelism  (0) 2022.06.02
digital twin  (0) 2022.04.13
Posted by 구차니