Skip to content

Commit

Permalink
Bump version, decoder and encoder updates, cleanup, and license addition
Browse files Browse the repository at this point in the history
  • Loading branch information
jdk committed Sep 23, 2024
1 parent 653f706 commit 280cccb
Show file tree
Hide file tree
Showing 45 changed files with 89 additions and 32 deletions.
33 changes: 27 additions & 6 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
# 3.27.16

- Adding License
- [libflirc] translate spelling fixes, cleanup, and error checks
- [libflirc] add delete index into libflirc
- [libflirc] fix missing 'k' in flirc_util record command
- [libflirc] flirc header documentation update
- [libflirc] bug fixes
- [libflirc] pre-processor fixes for ll.h
- [libir] GAP25 protocol edition with decoding and transmission
- [libir] fix to create pronto code with unknown code
- [libir] ensure we create a hash when no IR code is found
- [libir] fix NEC32 wrong description
- [libir] corrects apple NEC detection
- [libir] IR documentation cleanup
- [libir] ensure we create a similar hash as flirc_usb
- [libir] Nokia encoder and transmit
- [libir] Nokia 12/24/32 decoder
- [ir] IR example code cleanup
- [flirc_util] adding delete_index

# 3.27.15

- [libir] Denonk decoder and encoder support
- [libir] Example code cleanup
- [libir] Flirc Protocol support
- [libir] Iterative approach for more accurate detection
- [libir] Log fixes
- [libir] MCE Build fix
- [libir] NEC Should fail on count mismatch
- [libir] MCE build fix
- [libir] NEC should fail on count mismatch
- [libir] NEC48 encoder and decoder support
- [libir] NECext and NEC protocol detection fix
- [libir] Nokia 12/24/32 decoder and encoder support
- [libir] Panasonic Encoder Fixes
- [libir] Panasonic encoder fixes
- [libir] RC6 decoder fixes
- [libir] RC6 encoder support
- [libir] Win64 Addition
- [libir] Win64 addition
- [libir] XMP updates
- [libir] XMP Should fail on count mismatch
- [libflirc] Win64 Addition
- [libir] XMP should fail on count mismatch
- [libflirc] Win64 addition
14 changes: 14 additions & 0 deletions License
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# License

Copyright (c) 2024 Flirc Inc.

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use the Software solely in conjunction with Flirc manufactured hardware in commercial environments, subject to the following conditions:

1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2. The Software may not be used, copied, modified, merged, published, distributed, sublicensed, or sold except as permitted by this license.
3. The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.
4. Any use of the Software outside of the specified commercial environment with Flirc manufactured hardware is strictly prohibited.

For further information, please contact Flirc Inc.
34 changes: 29 additions & 5 deletions cli/src/cmds/flirc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

static inline int enough_args(int arguments, int amount_expected)
{
if (!((arguments) >= amount_expected)) {
if (arguments < amount_expected) {
logerror("Not Enough Arguments\n");
return -1;
}
Expand Down Expand Up @@ -162,15 +162,15 @@ APPCMD(record, &record,
"valid commands:\n"
" a-z <any single letter>\n"
" return, enter, escape, backspace, delete, tab, \n"
" space, F[1-12], printscreen, scroll, pause, insert, \n"
" space, F[1-12], print_screen, scroll, pause, insert, \n"
" home, pageup, pagedown, end, right, left, down, up, \n"
"Media Keys: \n"
" wake, eject, vol_up, vol_down, mute, play/pause, stop \n"
" rewind, fast_forward, next_track, prev_track \n"
"System Keys: \n"
" suspend\n"
"Other: \n"
" toggle [enbables/disables] flirc\n",
" toggle [enables/disables] flirc\n",
NULL);

CMDHANDLER(record_lp)
Expand Down Expand Up @@ -301,7 +301,7 @@ APPCMD(record_macro, &record_macro,
" flirc_util record_macro o\n"
" a-z <any single letter>\n"
" return, enter, escape, backspace, delete, tab, \n"
" space, F[1-12], printscreen, scroll, pause, insert, \n"
" space, F[1-12], print_screen, scroll, pause, insert, \n"
" home, pageup, pagedown, end, right, left, down, up, \n"
"Media Keys: \n"
" wake, eject, vol_up, vol_down, mute, play/pause, stop \n"
Expand Down Expand Up @@ -378,12 +378,31 @@ APPCMD(record_api, &record_api,

CMDHANDLER(delete_index)
{
int index;

if (enough_args(argc, 1) < 0) {
run_cmd_line("help delete_index", NULL);
return argc;
}

fl_delete_index(atoi(argv[0]));
index = atoi(argv[0]);

printf("Before Index Deletion\n");

if (fl_display_config() < 0)
log_err("failed to load configuration\n");

fl_delete_index(index);

fflush(stdout);
printf("\n\n");

printf("After Index Deletion\n");

if (fl_display_config() < 0)
log_err("failed to save configuration\n");

printf("\n");

return 1;
}
Expand Down Expand Up @@ -552,7 +571,12 @@ CMDHANDLER(dfu)
printf("[DEVICE] Failed\n");
return 1;
}
} else if (strcmp(argv[0], "flag") == 0) {
printf("clearing boot flag\n");
fl_set_boot_flag();
return 1;
} else {
printf("%s\n", argv[0]);
printf("Error: invalid dfu option\n");
run_cmd_line("help dfu", NULL);
return 1;
Expand Down
5 changes: 1 addition & 4 deletions cli/src/cmds/ir_transmit.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/**
* COPYRIGHT 2023 Flirc, Inc. All rights reserved.
* COPYRIGHT 2024 Flirc, Inc. All rights reserved.
*
* This copyright notice is Copyright Management Information under 17 USC 1202
* and is included to protect this work and deter copyright infringement.
* Removal or alteration of this Copyright Management Information without
* the express written permission of Flirc, Inc. is prohibited, and any
* such unauthorized removal or alteration will be a violation of federal law.
*
* @file
* @brief Flirc command file for IR transmitter
*/

#include <stdio.h>
Expand Down
18 changes: 8 additions & 10 deletions ir/main.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/**
* COPYRIGHT 2023 Flirc, Inc. All rights reserved.
* COPYRIGHT 2024 Flirc, Inc. All rights reserved.
*
* This copyright notice is Copyright Management Information under 17 USC 1202
* and is included to protect this work and deter copyright infringement.
* Removal or alteration of this Copyright Management Information without
* the express written permission of Flirc, Inc. is prohibited, and any
* such unauthorized removal or alteration will be a violation of federal law.
*
* @file
* @brief Flirc Library functions
*/

#include <stdio.h>
Expand Down Expand Up @@ -252,15 +249,16 @@ static void decode_raw(const char *line)

/* convert string to buf */
while (i < strlen(line)) {
while (i < strlen(line) && (line[i] == '+' || line[i] == '-'))
i++;

buf[len++] = strtol(&line[i], NULL, 10);
while ((line[i] != ' ' && line[i] != ',' && i < strlen(line))) {

while (i < strlen(line) && line[i] != ',' && line[i] != ' ')
i++;
};

if (line[0] == '-' && line[0] == '+')
line++;
else
i += 2;
/* Move to the next character after the delimiter */
i++;
}

buf_to_irp(buf, len, &p);
Expand Down
Binary file removed libs/Darwin_x86_64/libflirc.3.27.15.dylib
Binary file not shown.
Binary file added libs/Darwin_x86_64/libflirc.3.27.16.dylib
Binary file not shown.
Binary file modified libs/Darwin_x86_64/libflirc.a
Binary file not shown.
1 change: 0 additions & 1 deletion libs/Darwin_x86_64/libflirc.dylib

This file was deleted.

Binary file removed libs/Darwin_x86_64/libir.3.27.15.dylib
Binary file not shown.
Binary file added libs/Darwin_x86_64/libir.3.27.16.dylib
Binary file not shown.
Binary file modified libs/Darwin_x86_64/libir.a
Binary file not shown.
1 change: 0 additions & 1 deletion libs/Darwin_x86_64/libir.dylib

This file was deleted.

Binary file modified libs/Linux_aarch64/libflirc.a
Binary file not shown.
Binary file removed libs/Linux_aarch64/libflirc.so.3.27.15
Binary file not shown.
Binary file added libs/Linux_aarch64/libflirc.so.3.27.16
Binary file not shown.
Binary file modified libs/Linux_aarch64/libir.a
Binary file not shown.
Binary file removed libs/Linux_aarch64/libir.so.3.27.15
Binary file not shown.
Binary file added libs/Linux_aarch64/libir.so.3.27.16
Binary file not shown.
1 change: 1 addition & 0 deletions libs/Linux_arm/Linux_arm
Binary file modified libs/Linux_arm/libflirc.a
Binary file not shown.
Binary file renamed libs/Linux_arm/libflirc.so.3.27.15 → libs/Linux_arm/libflirc.so.3.27.16
100755 → 100644
Binary file not shown.
Binary file modified libs/Linux_arm/libir.a
Binary file not shown.
Binary file removed libs/Linux_arm/libir.so.3.27.15
Binary file not shown.
Binary file added libs/Linux_arm/libir.so.3.27.16
Binary file not shown.
Binary file modified libs/Linux_x86_64/libflirc.a
Binary file not shown.
Binary file removed libs/Linux_x86_64/libflirc.so.3.27.15
Binary file not shown.
Binary file added libs/Linux_x86_64/libflirc.so.3.27.16
Binary file not shown.
Binary file modified libs/Linux_x86_64/libir.a
Binary file not shown.
Binary file removed libs/Linux_x86_64/libir.so.3.27.15
Binary file not shown.
Binary file added libs/Linux_x86_64/libir.so.3.27.16
Binary file not shown.
Binary file modified libs/Win/libflirc.a
Binary file not shown.
Binary file modified libs/Win/libflirc.dll
100755 → 100644
Binary file not shown.
Binary file modified libs/Win/libflirc.lib
Binary file not shown.
Binary file modified libs/Win/libir.a
Binary file not shown.
Binary file modified libs/Win/libir.dll
100755 → 100644
Binary file not shown.
Binary file modified libs/Win/libir.lib
Binary file not shown.
Binary file modified libs/Win64/libflirc.a
Binary file not shown.
Binary file modified libs/Win64/libflirc.dll
100755 → 100644
Binary file not shown.
Binary file modified libs/Win64/libflirc.lib
Binary file not shown.
Binary file modified libs/Win64/libir.a
Binary file not shown.
Binary file modified libs/Win64/libir.dll
100755 → 100644
Binary file not shown.
Binary file modified libs/Win64/libir.lib
Binary file not shown.
13 changes: 8 additions & 5 deletions libs/include/flirc/flirc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* Removal or alteration of this Copyright Management Information without
* the express written permission of Flirc, Inc. is prohibited, and any
* such unauthorized removal or alteration will be a violation of federal law.
*
* @file
* @brief Flirc Library functions
*/

#include <stdint.h>
#include <stddef.h>

#ifdef FL_VERSION_HISTORY
#include <ll.h>
#endif

#ifndef I__FLIRC_H__
#define I__FLIRC_H__
Expand Down Expand Up @@ -44,6 +44,7 @@ extern "C" {
#define FIRMWARE_FLIRC_AMAZON 3
#define MAX_TIMEOUT 100

#ifdef FL_VERSION_HISTORY
struct fw_ver_hist {
/* verison string */
const char *v;
Expand All @@ -52,6 +53,7 @@ struct fw_ver_hist {
/* pointer to list node */
ll_t node;
};
#endif

/**
* fl_lib_version() - Retrieves the version of the Flirc library.
Expand Down Expand Up @@ -1013,11 +1015,12 @@ int fl_delete_index(int index);
void fl_libusb_logging(int enable);

/**
* fl_log() get usb event log
* fl_log() get usb event log. This function returns the number of characters
* placed in the passed buf
*
* @param buf - empty buf pointer to be filled. Min of 1024
*
* @return EOK - Operation successful.
* @return EOK - Operation successful, but no bytes left
* @return -EINVAL - Invalid value
* @return -ENODEV - Flirc not present
* @return -EWRONGDEV - Unsupported, device in bootloader
Expand Down
1 change: 1 addition & 0 deletions libs/include/ir/ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ enum rc_proto {
RC_PROTO_NEC_APPLE,
RC_PROTO_NEC_REPEAT,
RC_PROTO_PANASONIC,
RC_PROTO_GAP,
};

/**
Expand Down

0 comments on commit 280cccb

Please sign in to comment.