Skip to content

Commit

Permalink
Remove unused function, remove dev build settings, bump to v5.0.0 (#40)
Browse files Browse the repository at this point in the history
* Bump version to 5.0.0
* Add the bin directory to .gitignore
* Remove unused function, remove dev build settings, bump to v5.0.0
  • Loading branch information
bgok authored Feb 1, 2018
1 parent 4d0b2af commit 30033f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# .gitignore

bin

# Files generated by the build
interface/**/*.pb.h
interface/**/*.pb.c
Expand Down
4 changes: 2 additions & 2 deletions b
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def bump_version(args):

def compile_protocol_buffers():
version = json.load(open('version.json', 'r'))
tag = 'erc20'#'v%s.%s.%s' % (version['MAJOR_VERSION'], version['MINOR_VERSION'], version['PATCH_VERSION'])
tag = 'v%s.%s.%s' % (version['MAJOR_VERSION'], version['MINOR_VERSION'], version['PATCH_VERSION'])

if (True):#not os.path.exists('../%s' % DEVICE_PROTOCOL):
if not os.path.exists('../%s' % DEVICE_PROTOCOL):
local('git clone -b %s https://github.com/keepkey/%s.git ../%s' % (tag, DEVICE_PROTOCOL, DEVICE_PROTOCOL))

if not os.path.exists('interface/local'):
Expand Down
38 changes: 2 additions & 36 deletions keepkey/local/baremetal/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ uint32_t readprotobufint(uint8_t **ptr)
void rev_byte_order(uint8_t *bfr, size_t len)
{
size_t i;
uint8_t tempdata;
uint8_t tempdata;

for(i = 0; i < len/2; i++)
{
Expand All @@ -92,7 +92,7 @@ void dec64_to_str(uint64_t dec64_val, char *str)
static char *sbfr;

sbfr = str;
b = dec64_val %10;
b = dec64_val %10;
dec64_val = dec64_val / 10;

if(dec64_val)
Expand All @@ -102,37 +102,3 @@ void dec64_to_str(uint64_t dec64_val, char *str)
*sbfr = '0' + b;
sbfr++;
}


/*convert hex to bytes*/
int hex0xstr_to_char(const char *hex_str, unsigned char *byte_array, int byte_array_max)
{
int hex_str_len = strlen(hex_str) - 2;
int i = 2, j = 0;
unsigned int long_ch;

// The output array size is half the hex_str length (rounded up)
int byte_array_size = (hex_str_len+1)/2;

if (byte_array_size > byte_array_max)
{
// Too big for the output array
return -1;
}

for (; i < hex_str_len+2; i+=2, j++)
{
if (sscanf(&(hex_str[i]), "%02X", &long_ch) != 1)
{
return -1;
}
else
{
byte_array[j] = (char)long_ch;
}
}

return byte_array_size;
}


3 changes: 0 additions & 3 deletions keepkey/public/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,4 @@ uint32_t readprotobufint(uint8_t **ptr);
void rev_byte_order(uint8_t *bfr, size_t len);
void dec64_to_str(uint64_t dec64_val, char *str);

int hex0xstr_to_char(const char *hex_str, unsigned char *byte_array, int byte_array_max);


#endif
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"BOOTLOADER_PATCH_VERSION": 4, "MAJOR_VERSION": 4, "MINOR_VERSION": 0, "PATCH_VERSION": 1, "BOOTLOADER_MAJOR_VERSION": 1, "BOOTLOADER_MINOR_VERSION": 0}
{"BOOTLOADER_PATCH_VERSION": 4, "MAJOR_VERSION": 5, "MINOR_VERSION": 0, "PATCH_VERSION": 0, "BOOTLOADER_MAJOR_VERSION": 1, "BOOTLOADER_MINOR_VERSION": 0}

0 comments on commit 30033f4

Please sign in to comment.