Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Remove _blue/_green/_red scale prefix for color sensors
Browse files Browse the repository at this point in the history
Remove the execute bit on these source files

Signed-off-by: Yong Li <[email protected]>
  • Loading branch information
yongli3 committed Nov 7, 2016
1 parent 29e9f71 commit 3a1760c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
Empty file modified src/lib/io/include/sol-iio.h
100755 → 100644
Empty file.
13 changes: 12 additions & 1 deletion src/lib/io/sol-iio.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,22 @@ channel_get_pure_name(const char *name)
channel_name[sizeof(channel_name) - 1] = '\0';

channel_name_len = strlen(channel_name);
if (strendswith(channel_name, "_both")) {
if (strendswith(channel_name, "_green")) {
channel_name[channel_name_len - 6] = '\0';
modified = true;
}

if (strendswith(channel_name, "_both") ||
strendswith(channel_name, "_blue")) {
channel_name[channel_name_len - 5] = '\0';
modified = true;
}

if (strendswith(channel_name, "_red")) {
channel_name[channel_name_len - 4] = '\0';
modified = true;
}

if (strendswith(channel_name, "_ir") ||
strendswith(channel_name, "_uv")) {
channel_name[channel_name_len - 3] = '\0';
Expand Down
Empty file modified src/modules/flow/iio/iio.json
100755 → 100644
Empty file.
Empty file modified src/modules/flow/iio/nodes.c
100755 → 100644
Empty file.

0 comments on commit 3a1760c

Please sign in to comment.