Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fewer headers and change i to uint16_t #17

Merged
merged 1 commit into from May 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/canard.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "canard.h"
#include "canard_internals.h"
#include <inttypes.h>
#include <string.h>


#define CANARD_MAKE_TRANSFER_DESCRIPTOR(data_type_id, transfer_type, \
Expand Down Expand Up @@ -299,7 +300,7 @@ void canardHandleRxFrame(CanardInstance* ins, const CanardCANFrame* frame, uint6
uint16_t middle_len = 0;
if (rxstate->payload_len < CANARD_RX_PAYLOAD_HEAD_SIZE)
{
int i;
uint16_t i;
for (i=rxstate->payload_len, tail_offset=0; i<CANARD_RX_PAYLOAD_HEAD_SIZE && tail_offset<frame->data_len-1; i++, tail_offset++)
{
rxstate->buffer_head[i] = frame->data[tail_offset];
Expand Down
5 changes: 0 additions & 5 deletions src/canard.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@
extern "C" {
#endif

#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>

/** The size of a memory block in bytes. */
Expand Down
2 changes: 1 addition & 1 deletion src/canard_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef CANARD_INTERNALS_H
#define CANARD_INTERNALS_H

#include <unistd.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 0 additions & 2 deletions src/canard_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>
#include <pthread.h>
#include "canard.h"
// #include "canard_debug.h"
/*
Expand Down