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

trailing spaces cleanup #2659

Merged
merged 2 commits into from
Feb 17, 2019
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .gdbinit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# This is very much a work in progress to show how we can use macros to make the
# GDB interface a lot more useable. For example the next / step commands only
# work if the stepper doesn't leave the current scope. Beyond that you have a
# single hardware breakpoint which can be used as an hb or a wa. You have to
# remember to delete the previous one, so the br macro does this for you.
# This is very much a work in progress to show how we can use macros to make the
# GDB interface a lot more useable. For example the next / step commands only
# work if the stepper doesn't leave the current scope. Beyond that you have a
# single hardware breakpoint which can be used as an hb or a wa. You have to
# remember to delete the previous one, so the br macro does this for you.
#
file app/.output/eagle/debug/image/eagle.app.v6.out
#set remotedebug 1
Expand All @@ -16,12 +16,12 @@ target remote /dev/ttyUSB0

set confirm off
set print null-stop
define br
define br
d
hb $arg0
end

define upto
define upto
d
hb $arg0
c
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/h
Which branch are you on? If you know the Git revision then add it here as well.

### Hardware
Describe which ESP8266 device you use and document any special hardware setup
Describe which ESP8266 device you use and document any special hardware setup
required to reproduce the problem.

8<------------------------ END BUG REPORT -------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Avoid intermediate merge commits. [Rebase](https://www.atlassian.com/git/tutoria

This is just one way of doing things. If you're proficient in Git matters you're free to choose your own. If you want to read more then the [GitHub chapter in the Git book](http://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project#The-GitHub-Flow) is a way to start. [GitHub's own documentation](https://help.github.com/categories/collaborating-with-issues-and-pull-requests/) contains a wealth of information as well.

As a Windows or Mac user you could also resort to [GitHub Desktop](https://desktop.github.com/). It's a mature GUI application that supports most of the tasks outlined above.
As a Windows or Mac user you could also resort to [GitHub Desktop](https://desktop.github.com/). It's a mature GUI application that supports most of the tasks outlined above.

### Keeping your fork in sync
You need to sync your fork with the NodeMCU upstream repository from time to time, latest before you rebase (see flow above).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ wifi.sta.config{ssid="SSID", pwd="password"}

# Documentation

The entire [NodeMCU documentation](https://nodemcu.readthedocs.io) is maintained right in this repository at [/docs](docs). The fact that the API documentation is maintained in the same repository as the code that *provides* the API ensures consistency between the two. With every commit the documentation is rebuilt by Read the Docs and thus transformed from terse Markdown into a nicely browsable HTML site at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io).
The entire [NodeMCU documentation](https://nodemcu.readthedocs.io) is maintained right in this repository at [/docs](docs). The fact that the API documentation is maintained in the same repository as the code that *provides* the API ensures consistency between the two. With every commit the documentation is rebuilt by Read the Docs and thus transformed from terse Markdown into a nicely browsable HTML site at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io).

- How to [build the firmware](https://nodemcu.readthedocs.io/en/master/en/build/)
- How to [flash the firmware](https://nodemcu.readthedocs.io/en/master/en/flash/)
Expand Down
2 changes: 1 addition & 1 deletion app/coap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#DEFINES +=
#DEFINES +=

#############################################################
# Recursion Magic - Don't touch this!!
Expand Down
16 changes: 8 additions & 8 deletions app/coap/coap.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ typedef struct
uint8_t ver; /* CoAP version number */
uint8_t t; /* CoAP Message Type */
uint8_t tkl; /* Token length: indicates length of the Token field */
uint8_t code; /* CoAP status code. Can be request (0.xx), success reponse (2.xx),
* client error response (4.xx), or rever error response (5.xx)
uint8_t code; /* CoAP status code. Can be request (0.xx), success reponse (2.xx),
* client error response (4.xx), or rever error response (5.xx)
* For possible values, see http://tools.ietf.org/html/rfc7252#section-12.1 */
uint8_t id[2];
} coap_header_t;
Expand Down Expand Up @@ -164,14 +164,14 @@ struct coap_luser_entry{

struct coap_endpoint_t{
coap_method_t method; /* (i.e. POST, PUT or GET) */
coap_endpoint_func handler; /* callback function which handles this
* type of endpoint (and calls
coap_endpoint_func handler; /* callback function which handles this
* type of endpoint (and calls
* coap_make_response() at some point) */
const coap_endpoint_path_t *path; /* path towards a resource (i.e. foo/bar/) */
const coap_endpoint_path_t *path; /* path towards a resource (i.e. foo/bar/) */
const char *core_attr; /* the 'ct' attribute, as defined in RFC7252, section 7.2.1.:
* "The Content-Format code "ct" attribute
* provides a hint about the
* Content-Formats this resource returns."
* "The Content-Format code "ct" attribute
* provides a hint about the
* Content-Formats this resource returns."
* (Section 12.3. lists possible ct values.) */
coap_luser_entry *user_entry;
};
Expand Down
2 changes: 1 addition & 1 deletion app/coap/coap_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ coap_tid_t coap_send_confirmed(struct espconn *pesp_conn, coap_pdu_t *pdu) {
*/
coap_timer_stop();
coap_timer_update(&gQueue);
node->t = node->timeout;
node->t = node->timeout;
coap_insert_node(&gQueue, node);
coap_timer_start(&gQueue);
return node->id;
Expand Down
2 changes: 1 addition & 1 deletion app/coap/coap_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extern "C" {
#include "espconn.h"
#include "pdu.h"
#include "hash.h"

coap_tid_t coap_send(struct espconn *pesp_conn, coap_pdu_t *pdu);

coap_tid_t coap_send_confirmed(struct espconn *pesp_conn, coap_pdu_t *pdu);
Expand Down
4 changes: 2 additions & 2 deletions app/coap/coap_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ void coap_timer_tick(void *arg){
node->retransmit_cnt++;
node->t = node->timeout << node->retransmit_cnt;

NODE_DBG("** retransmission #%d of transaction %d\n",
NODE_DBG("** retransmission #%d of transaction %d\n",
node->retransmit_cnt, (((uint16_t)(node->pdu->pkt->hdr.id[0]))<<8)+node->pdu->pkt->hdr.id[1]);
node->id = coap_send(node->pconn, node->pdu);
if (COAP_INVALID_TID == node->id) {
NODE_DBG("retransmission: error sending pdu\n");
coap_delete_node(node);
} else {
coap_insert_node(queue, node);
coap_insert_node(queue, node);
}
} else {
/* And finally delete the node */
Expand Down
10 changes: 5 additions & 5 deletions app/coap/endpoints.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
NODE_DBG("\n");
lua_settop(L, n);
return coap_make_response(scratch, outpkt, ret, len, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_CONTENT, COAP_CONTENTTYPE_TEXT_PLAIN);
}
}
} else {
lua_settop(L, n);
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_CONTENT, COAP_CONTENTTYPE_TEXT_PLAIN);
Expand All @@ -157,7 +157,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
goto end;
}
}
NODE_DBG("none match.\n");
NODE_DBG("none match.\n");
end:
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE);
}
Expand Down Expand Up @@ -226,7 +226,7 @@ void build_well_known_rsp(char *rsp, uint16_t rsplen)
c_strncat(rsp, ",", len);
len--;
}

c_strncat(rsp, "<", len);
len--;

Expand All @@ -250,7 +250,7 @@ void build_well_known_rsp(char *rsp, uint16_t rsplen)
c_strncat(rsp, ",", len);
len--;
}

c_strncat(rsp, "<", len);
len--;

Expand All @@ -272,7 +272,7 @@ void build_well_known_rsp(char *rsp, uint16_t rsplen)
len -= 2;

c_strncat(rsp, ep->core_attr, len);
len -= c_strlen(ep->core_attr);
len -= c_strlen(ep->core_attr);

h = h->next;
}
Expand Down
6 changes: 3 additions & 3 deletions app/coap/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void coap_hash(const unsigned char *s, unsigned int len, coap_key_t h) {

while (len--) {
j = sizeof(coap_key_t)-1;

while (j) {
h[j] = ((h[j] << 7) | (h[j-1] >> 1)) + h[j];
--j;
Expand All @@ -23,8 +23,8 @@ void coap_transaction_id(const uint32_t ip, const uint32_t port, const coap_pack
c_memset(h, 0, sizeof(coap_key_t));

/* Compare the transport address. */
coap_hash((const unsigned char *)&(port), sizeof(port), h);
coap_hash((const unsigned char *)&(ip), sizeof(ip), h);
coap_hash((const unsigned char *)&(port), sizeof(port), h);
coap_hash((const unsigned char *)&(ip), sizeof(ip), h);
coap_hash((const unsigned char *)(pkt->hdr.id), sizeof(pkt->hdr.id), h);
*id = ((h[0] << 8) | h[1]) ^ ((h[2] << 8) | h[3]);
}
2 changes: 1 addition & 1 deletion app/coap/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ coap_queue_t * coap_pop_next( coap_queue_t **queue ) { // this function is call

int coap_remove_node( coap_queue_t **queue, const coap_tid_t id){
coap_queue_t *p, *q, *node;
if ( !queue )
if ( !queue )
return 0;
if ( !*queue ) // if empty
return 0;
Expand Down
2 changes: 1 addition & 1 deletion app/coap/pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ coap_pdu_t * coap_new_pdu(void) {
return NULL;
}
pdu->scratch.len = MAX_REQ_SCRATCH_SIZE;

pdu->pkt = (coap_packet_t *)c_zalloc(sizeof(coap_packet_t));
if(!pdu->pkt){
NODE_DBG("coap_new_pdu malloc error.\n");
Expand Down
4 changes: 2 additions & 2 deletions app/coap/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Copyright (C) 2010,2011 Olaf Bergmann <[email protected]>
*
* This file is part of the CoAP library libcoap. Please see
* README for terms of use.
* README for terms of use.
*/

#include "c_stdlib.h"
#include "c_types.h"

#include "str.h"

str * coap_new_string(size_t size) {
Expand Down
2 changes: 1 addition & 1 deletion app/coap/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (C) 2010,2011 Olaf Bergmann <[email protected]>
*
* This file is part of the CoAP library libcoap. Please see
* README for terms of use.
* README for terms of use.
*/

#ifndef _COAP_STR_H_
Expand Down
Loading