How to decode a Barker code
Under the white Gaussian noise assumption, the optimal decoder would be to minimize each window of $7$ bits, that is take you first 7 symbols 
$$s_1 = [\:\:1,−1,\:\:1,\:\:1,\:\:1,−1,\:\:1]$$
and compute two metrics 
$$c_0 = \Vert s_1 - b_0 \Vert_2^2 = 2^2 + 2^2 + 2^2 + 2^2 + 2^2 = 20$$
$$c_1 = \Vert s_1 - b_1 \Vert_2^2  = 2^2 + 2^2 = 4$$
where $b_1 = [−1,−1,−1,1,1,−1,1]$ is the Barker code corresponding to $1$ and $b_0 = [1,1,1,-1,-1,1,-1]$ is the Barker code corresponding to $0$. So if $c_0 &lt; c_1$ then the first received bits is $0$, else $1$.

Next, grab the other $7$ symbols 
$$s_2 = [1,-1,1,-1,-1,1,-1]$$
and do the same thing.

PS: You could have also computed a Hamming distance as the criterion chooses the minimum number of errors.