mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
make style
This commit is contained in:
parent
e3e33a6501
commit
b55c186b3a
5 changed files with 22 additions and 20 deletions
6
client/pyscripts/theremin.py
Normal file → Executable file
6
client/pyscripts/theremin.py
Normal file → Executable file
|
@ -66,7 +66,8 @@ while True:
|
||||||
max_v = v
|
max_v = v
|
||||||
|
|
||||||
# Recalculate the audio frequency to generate
|
# Recalculate the audio frequency to generate
|
||||||
out_freq = (max_freq - min_freq) * (max_v - v) / (max_v - min_v) + min_freq
|
out_freq = (max_freq - min_freq) * (max_v - v) / (max_v - min_v) \
|
||||||
|
+ min_freq
|
||||||
|
|
||||||
# Generate the samples and write them to the soundcard
|
# Generate the samples and write them to the soundcard
|
||||||
sinevs = out_freq / sampling_freq * numpy.pi * 2
|
sinevs = out_freq / sampling_freq * numpy.pi * 2
|
||||||
|
@ -75,4 +76,5 @@ while True:
|
||||||
sinev = sinev if sinev < numpy.pi * 2 else sinev - numpy.pi * 2
|
sinev = sinev if sinev < numpy.pi * 2 else sinev - numpy.pi * 2
|
||||||
i = (i + 1) % sample_buf_size
|
i = (i + 1) % sample_buf_size
|
||||||
if not i:
|
if not i:
|
||||||
stream.write((numpy.sin(sample_buf) * volume).astype(numpy.float32).tobytes())
|
stream.write((numpy.sin(sample_buf) * volume).
|
||||||
|
astype(numpy.float32).tobytes())
|
||||||
|
|
|
@ -770,7 +770,7 @@ static int CmdHFiClassELoad(const char *Cmd) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EML: {
|
case EML: {
|
||||||
res = loadFileEML_safe(filename, (void**)&dump, &bytes_read);
|
res = loadFileEML_safe(filename, (void **)&dump, &bytes_read);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case JSON: {
|
case JSON: {
|
||||||
|
@ -1676,7 +1676,7 @@ static int CmdHFiClassCloneTag(const char *Cmd) {
|
||||||
|
|
||||||
uint8_t *dump = NULL;
|
uint8_t *dump = NULL;
|
||||||
size_t bytes_read = 0;
|
size_t bytes_read = 0;
|
||||||
if (loadFile_safe(filename, "", (void**)&dump, &bytes_read) != PM3_SUCCESS) {
|
if (loadFile_safe(filename, "", (void **)&dump, &bytes_read) != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(FAILED, "File: " _YELLOW_("%s") ": not found or locked.", filename);
|
PrintAndLogEx(FAILED, "File: " _YELLOW_("%s") ": not found or locked.", filename);
|
||||||
return PM3_EFILE;
|
return PM3_EFILE;
|
||||||
}
|
}
|
||||||
|
@ -2040,7 +2040,7 @@ static int CmdHFiClassReadTagFile(const char *Cmd) {
|
||||||
|
|
||||||
uint8_t *dump = NULL;
|
uint8_t *dump = NULL;
|
||||||
size_t bytes_read = 0;
|
size_t bytes_read = 0;
|
||||||
if (loadFile_safe(filename, "", (void**)&dump, &bytes_read) != PM3_SUCCESS) {
|
if (loadFile_safe(filename, "", (void **)&dump, &bytes_read) != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(FAILED, "File: " _YELLOW_("%s") ": not found or locked.", filename);
|
PrintAndLogEx(FAILED, "File: " _YELLOW_("%s") ": not found or locked.", filename);
|
||||||
return PM3_EFILE;
|
return PM3_EFILE;
|
||||||
}
|
}
|
||||||
|
@ -2190,7 +2190,7 @@ static int loadKeys(char *filename) {
|
||||||
|
|
||||||
uint8_t *dump = NULL;
|
uint8_t *dump = NULL;
|
||||||
size_t bytes_read = 0;
|
size_t bytes_read = 0;
|
||||||
if (loadFile_safe(filename, "", (void**)&dump, &bytes_read) != PM3_SUCCESS) {
|
if (loadFile_safe(filename, "", (void **)&dump, &bytes_read) != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(FAILED, "File: " _YELLOW_("%s") ": not found or locked.", filename);
|
PrintAndLogEx(FAILED, "File: " _YELLOW_("%s") ": not found or locked.", filename);
|
||||||
return PM3_EFILE;
|
return PM3_EFILE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue